:root {
    --primary: #4f86f7;
    --primary-dark: #3b6fd9;
    --primary-light: #6ba3ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    padding: 40px 20px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-800);
    text-shadow: none;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--gray-500);
    font-weight: 400;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-100);
}

.card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.link-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s;
}

.link-card:hover::before {
    opacity: 1;
}

.link-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    transition: transform 0.3s;
}

.link-card:hover .link-icon {
    transform: scale(1.1);
}

.link-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.link-desc {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 12px;
}

.link-platform {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 0.95rem;
    background: var(--gray-50);
    margin-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary-dark);
}

.admin-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    color: var(--primary);
    padding: 14px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    z-index: 100;
}

.admin-float-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--gray-50);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead {
    background: var(--gray-50);
}

th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.message {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: white;
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.nav-tabs a {
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 600;
    transition: all 0.2s;
}

.nav-tabs a:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.nav-tabs a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.actions {
    display: flex;
    gap: 8px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header {
        padding: 40px 16px 30px;
    }

    .card {
        padding: 24px 20px;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tabs a {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 12px 10px;
    }

    .admin-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

.password-toggle {
    position: relative;
}

.password-toggle input {
    padding-right: 44px;
}

.toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toggle-btn:hover {
    opacity: 1;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}