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

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #242424;
    --accent: #ff4444;
    --accent-hover: #ff6666;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --border: #333333;
    --glow: rgba(255, 68, 68, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Navigation */
.main-nav {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #ff8888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--glow);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--glow), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--glow);
}

.nav-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow);
}

/* Main Content */
.content-area {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.tab-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.section-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Bio Card */
.bio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.bio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.bio-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff8888 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 0 30px var(--glow);
    animation: pulse 2s infinite;
    overflow: hidden;
}

.bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 30px var(--glow);
    }
    50% {
        box-shadow: 0 0 50px var(--glow), 0 0 80px var(--glow);
    }
}

.bio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.bio-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.bio-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Info Box */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.info-box p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-box p:last-child {
    margin-bottom: 0;
    color: var(--text-muted);
    font-style: italic;
}

/* Idiots Section */
.placeholder-box {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 2rem;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.placeholder-icon {
    font-size: 3rem;
}

.idiots-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
}

.idiots-counter {
    text-align: center;
}

.idiots-counter .count {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.idiots-counter .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.add-idiot-btn {
    background: var(--accent);
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-idiot-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 5px 20px var(--glow);
}

.add-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.add-form.hidden {
    display: none;
}

.add-form input,
.add-form textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: inherit;
}

.add-form input:focus,
.add-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--glow);
}

.add-form textarea {
    min-height: 100px;
    resize: vertical;
}

.add-form button {
    background: var(--accent);
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-form button:hover {
    background: var(--accent-hover);
}

.idiot-list {
    list-style: none;
}

.idiot-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.idiot-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.idiot-item h4 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.idiot-item p {
    color: var(--text-secondary);
}

.idiot-item .idiot-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.idiot-item .idiot-images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.idiot-item .idiot-images img:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.image-upload-area {
    margin-bottom: 1rem;
}

.image-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-label:hover {
    border-color: var(--accent);
    background: var(--bg-primary);
}

.image-upload-label input {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.image-preview .preview-thumb {
    position: relative;
    width: 80px;
    height: 80px;
}

.image-preview .preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.image-preview .preview-thumb .remove-thumb {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal for full image view */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.image-modal .close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

/* Footer */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
}

.main-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */

/* Auth Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active,
.modal-overlay:not(.hidden) {
    display: flex;
}

.auth-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.auth-box .close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-box .close-modal:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.auth-tab:hover {
    border-color: var(--accent);
}

.auth-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-form button {
    width: 100%;
    background: var(--accent);
    border: none;
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-form button:hover {
    background: var(--accent-hover);
}

/* User Menu */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-trigger {
    background: var(--accent);
    border: none;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
}

.admin-login-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    border: 1px solid var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: adminPulse 2s infinite;
}

@keyframes adminPulse {
    0%, 100% {
        box-shadow: 0 0 5px var(--glow);
    }
    50% {
        box-shadow: 0 0 15px var(--glow), 0 0 25px var(--accent);
    }
}

.admin-login-btn:hover {
    background: linear-gradient(135deg, #ff4444, #ff2222);
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem;
    padding-right: 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.user-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-btn:hover {
    border-color: var(--accent);
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    min-width: 150px;
    margin-top: 0.5rem;
}

.dropdown button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
}

.dropdown button:hover {
    background: var(--bg-secondary);
}

.user-menu {
    position: relative;
}

/* Profile Section */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--text-muted);
}

.profile-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.profile-stats .stat {
    text-align: center;
}

.idiot-meta {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.delete-idiot-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.delete-idiot-btn:hover {
    background: #ff2222;
}

.admin-badge::after {
    content: ' 👑';
}

@media (max-width: 768px) {
    .nav-right {
        flex-direction: column;
        width: 100%;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .section-content {
        padding: 1.5rem;
    }

    .bio-stats {
        gap: 1rem;
    }

    .idiots-list {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .section-content h2 {
        font-size: 1.5rem;
    }

    .bio-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

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

/* Profiles Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.profile-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-card-mini:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.profile-card-mini-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 2px solid var(--accent);
}

.profile-card-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-mini h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.profile-card-mini p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-badge-mini {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--accent);
    }
    50% {
        box-shadow: 0 0 15px var(--accent), 0 0 25px var(--accent);
    }
}

.animated-admin {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent), #ff8888, var(--accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s linear infinite, glow-admin 2s ease-in-out infinite;
    font-weight: bold;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes glow-admin {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--accent));
    }
    50% {
        filter: drop-shadow(0 0 15px var(--accent)) drop-shadow(0 0 25px var(--glow));
    }
}

.profile-bio-mini {
    font-size: 0.8rem !important;
    margin: 0.5rem 0;
    color: var(--text-secondary) !important;
}

.idiots-count-mini {
    display: block;
    background: var(--bg-secondary);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.edit-profile-btn {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.edit-profile-btn:hover {
    border-color: var(--accent);
}

.edit-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.edit-form h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.edit-form input,
.edit-form textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: inherit;
}

.edit-form input:focus,
.edit-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.edit-form button {
    width: 100%;
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
}

.edit-form button:hover {
    background: var(--accent-hover);
}

.delete-account-btn {
    width: 100%;
    background: #ff2222;
    border: none;
    color: white;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.delete-account-btn:hover {
    background: #ff0000;
}

.comments-section {
    margin-top: 2rem;
}

.comments-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#commentsList {
    margin-bottom: 1rem;
}

.comment-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author {
    color: var(--accent);
    font-weight: 600;
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-secondary);
    margin-left: 2.5rem;
}

.add-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-comment-form textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 60px;
    font-family: inherit;
    resize: vertical;
}

.add-comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.add-comment-form button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    align-self: flex-start;
}

.add-comment-form button:hover {
    background: var(--accent-hover);
}

.hidden {
    display: none !important;
}