* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --accent: #00ff88;
    --accent-hover: #00cc6a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border: #2a2a2a;
    --danger: #ff4444;
    --warning: #ffaa00;
    --success: #00ff88;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 50px;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-image {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -1.5px;
    line-height: 1;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
}

.admin-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background-clip: padding-box;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent), #00aaff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0, 255, 136, 0.15);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -3px;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--accent);
    background: var(--bg-tertiary);
}

.search-bar {
    margin-bottom: 30px;
}

.search-bar input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.item-card {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background-clip: padding-box;
}

.item-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent), #00aaff, var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.item-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.15);
}

.item-card:hover::before {
    opacity: 1;
}

.item-content {
    padding: 28px;
    position: relative;
    z-index: 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.item-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.item-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1.15;
}

.item-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.item-type::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.item-type.script {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.3), rgba(0, 170, 255, 0.15));
    color: #00aaff;
    border: 1px solid rgba(0, 170, 255, 0.5);
}

.item-type.script::before {
    background: #00aaff;
}

.item-type.executor {
    background: linear-gradient(135deg, rgba(255, 100, 255, 0.3), rgba(255, 100, 255, 0.15));
    color: #ff64ff;
    border: 1px solid rgba(255, 100, 255, 0.5);
}

.item-type.executor::before {
    background: #ff64ff;
}

.item-description {
    color: var(--text-secondary);
    font-size: 0.94rem;
    margin-bottom: 24px;
    line-height: 1.65;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.item-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.item-status-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.item-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.item-status.verified {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(0, 255, 136, 0.15));
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.item-status.safe {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.25), rgba(0, 170, 255, 0.15));
    color: #00aaff;
    border: 1px solid rgba(0, 170, 255, 0.4);
}

.item-status.updated {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.25), rgba(255, 170, 0, 0.15));
    color: var(--warning);
    border: 1px solid rgba(255, 170, 0, 0.4);
}

.item-status::before {
    content: '✓';
    font-weight: 800;
    font-size: 0.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

.item-link {
    background: linear-gradient(135deg, var(--accent), #00cc6a);
    color: var(--bg-primary);
    padding: 14px 0;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.96rem;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.item-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.item-link:hover::before {
    left: 100%;
}

.item-link:hover {
    background: linear-gradient(135deg, #00cc6a, var(--accent));
    transform: translateY(-3px);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    display: none;
}

.empty-state p {
    font-size: 1.1rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-secondary);
    margin: 50px auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent);
}

.modal-body {
    padding: 30px;
}

.admin-section {
    margin-bottom: 40px;
}

.admin-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
}

.checkbox-label:hover {
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.1);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] + span::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-primary);
    transition: all 0.3s ease;
    vertical-align: middle;
    flex-shrink: 0;
}

.checkbox-label:hover input[type="checkbox"] + span::before {
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + span::before {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + span::after {
    content: '✓';
    position: absolute;
    left: 23px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bg-primary);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.checkbox-label span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 20px;
    display: flex;
    align-items: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.admin-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-item-actions {
    display: flex;
    gap: 10px;
}

.admin-item-info {
    flex: 1;
}

.admin-item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.admin-item-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-edit {
    background: #4a9eff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #2a7edf;
    transform: translateY(-2px);
}

.btn-delete {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #ff0000;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    color: var(--text-secondary);
}

footer p {
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.hidden-input {
    display: none;
}

.hidden {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
