/* ============================================
   CSS Variables & Theme System
   ============================================ */
:root {
    /* Colors - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --code-bg: #1e293b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(15, 23, 42, 0.95);
    --code-bg: #0f172a;
}

/* ============================================
   Base Styles & Reset
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    width: 100%;
    min-width: 0;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.5rem); }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.icon-btn:hover {
    background: var(--accent-primary);
    color: #ffffff;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

#navbar.scrolled {
    box-shadow: var(--card-shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 16px 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-bracket {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.social-links a:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 998;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    box-shadow: var(--card-shadow);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-links {
    list-style: none;
    padding: 20px;
}

.mobile-nav-links li {
    margin-bottom: 16px;
}

.mobile-nav-link {
    display: block;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.mobile-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

/* Mobile Auth Actions */
.mobile-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 20px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.hero-greeting {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    min-height: 2rem;
}

.typing-text {
    color: var(--accent-primary);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Code Window */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    background: var(--code-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
    max-width: 450px;
    width: 100%;
    box-sizing: border-box;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-title {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.code-content {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    color: #e2e8f0;
}

.code-keyword { color: #c792ea; }
.code-variable { color: #82aaff; }
.code-property { color: #f78c6c; }
.code-string { color: #c3e88d; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.scroll-indicator a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: var(--section-padding);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 48px;
    position: relative;
}

.section-number {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-right: 8px;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
}

.highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.highlight-card i {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.highlight-card h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.highlight-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   Skills Section
   ============================================ */
.skills-section {
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.skill-category {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--card-shadow);
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--accent-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.skill-tag:hover {
    background: var(--accent-primary);
    color: #ffffff;
}

.skill-tag i {
    font-size: 0.9rem;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-section {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.project {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.project:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.project-content {
    padding: 24px;
}

.project-content h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.language-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid currentColor;
    opacity: 0.9;
    transition: all var(--transition-fast);
}

.language-tag:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.language-tag i {
    font-size: 0.9rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.project-link:hover {
    text-decoration: underline;
}

.delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-normal);
}

.project:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* More Projects Placeholder */
.more-projects-placeholder {
    border: 2px dashed var(--border-color);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    cursor: default;
    transition: all var(--transition-normal);
    min-height: 400px;
}

.more-projects-placeholder:hover {
    transform: translateY(0);
    border-color: var(--accent-primary);
    box-shadow: var(--card-shadow);
}

.more-projects-content {
    text-align: center;
    padding: 32px 24px !important;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.more-projects-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.more-projects-icon .fa-cog {
    font-size: 2rem;
}

.more-projects-placeholder h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.more-projects-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
    /* Ensure text is not clipped - override project-content p styles */
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    white-space: normal;
    word-wrap: break-word;
}

.more-projects-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.more-projects-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--bg-primary);
    border-radius: 20px;
}

.more-projects-footer i {
    color: var(--accent-primary);
}

/* Loading State */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 0;
}

.loading.active {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.contact-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.contact-link i {
    font-size: 1.2rem;
    color: var(--accent-primary);
    width: 24px;
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

/* Language Checkboxes */
.language-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.language-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.language-checkbox:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.language-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.language-checkbox span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
}

.language-checkbox input:checked + span {
    color: var(--accent-primary);
    font-weight: 500;
}

.language-checkbox i {
    font-size: 1rem;
}

/* ============================================
   Modal & Form Containers
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    padding-right: 40px;
}

.modal-content p {
    margin-bottom: 20px;
}

.modal-content img {
    width: 100%;
    border-radius: var(--border-radius-sm);
    margin: 16px 0;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-close:hover {
    background: var(--error);
    color: #ffffff;
}

/* Form Container (Add/Edit Project) */
.form-container {
    display: none;
}

.form-container.modal-form {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.form-container.active {
    display: flex;
}

.form-inner {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.form-inner h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-inner h3 i {
    color: var(--accent-primary);
}

.close-form-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.close-form-btn:hover {
    background: var(--error);
    color: #ffffff;
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 900;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.footer-social a:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-4px);
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-visual {
        order: 2;
        margin-top: 40px;
    }

    .hero-description {
        margin: 0 auto 32px;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .highlight-card {
        flex: 1;
        min-width: 150px;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    /* Fix mobile overflow issues */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .container {
        padding: 0 16px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: block;
        max-height: calc(100vh - 73px);
        overflow-y: auto;
    }

    .nav-actions .social-links,
    .nav-actions #login-btn,
    .nav-actions #logout-btn,
    .nav-actions #add-project-btn {
        display: none !important;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-content {
        padding: 0 16px;
        gap: 30px;
    }

    .hero-description {
        max-width: 100%;
        padding: 0 8px;
    }

    .code-window {
        font-size: 0.8rem;
        max-width: calc(100vw - 32px);
    }

    .code-content {
        padding: 16px;
        overflow-x: auto;
        font-size: 0.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        flex-direction: column;
    }

    .highlight-card {
        min-width: 100%;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    /* Mobile form improvements */
    .form-container.modal-form {
        padding: 16px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .form-inner {
        max-height: none;
        margin: auto 0;
    }

    .login-form-inner {
        max-width: 100%;
    }

    .login-logo {
        font-size: 2rem;
    }

    .login-header h3 {
        font-size: 1.3rem;
    }

    /* Rich text editor mobile optimizations */
    .editor-toolbar {
        flex-wrap: wrap;
        padding: 8px;
        gap: 2px;
    }

    .editor-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .rich-editor {
        min-height: 100px;
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    /* Modal improvements for mobile */
    .modal {
        padding: 16px;
    }

    .modal-content {
        padding: 24px 16px;
        max-height: calc(100vh - 32px);
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Improve touch targets */
    .btn {
        min-height: 44px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 44px;
    }

    /* Contact form on mobile */
    .contact-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .modal-content,
    .form-inner {
        padding: 20px 16px;
        border-radius: var(--border-radius);
    }

    .form-inner h3 {
        font-size: 1.1rem;
        padding-right: 30px;
    }

    .close-form-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    /* Smaller nav container padding on very small screens */
    .nav-container {
        padding: 12px 16px;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Hero section adjustments */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Project cards */
    .project-content {
        padding: 16px;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 32px;
    }

    /* Footer adjustments */
    .footer-logo {
        font-size: 1.5rem;
    }

    .footer-tagline {
        font-size: 0.9rem;
    }
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grid items - handled via JavaScript for scalability */
.project {
    --animation-order: 0;
    transition-delay: calc(var(--animation-order) * 0.1s);
}

/* Print Styles */
@media print {
    #navbar,
    .scroll-top-btn,
    .mobile-menu,
    .modal,
    .form-container {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   Login Modal Styles
   ============================================ */
.login-form-inner {
    max-width: 420px;
    text-align: center;
}

.login-header {
    margin-bottom: 32px;
}

.login-logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.login-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

#login-form .form-group {
    text-align: left;
}

#login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

#login-form .form-group label i {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--accent-primary);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: none;
}

.login-error.visible {
    display: block;
}

.login-submit-btn {
    margin-top: 8px;
    padding: 14px 24px;
    font-size: 1rem;
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer i {
    color: var(--accent-primary);
}

/* ============================================
   Rich Text Editor Styles
   ============================================ */
.rich-editor-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.rich-editor-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.editor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.editor-btn:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

.editor-btn.active {
    background: var(--accent-primary);
    color: #ffffff;
}

.editor-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.rich-editor {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    padding: 14px 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
}

.rich-editor:empty::before {
    content: attr(placeholder);
    color: var(--text-muted);
    pointer-events: none;
}

.rich-editor b,
.rich-editor strong {
    font-weight: 600;
}

.rich-editor i,
.rich-editor em {
    font-style: italic;
}

.rich-editor u {
    text-decoration: underline;
}

.rich-editor s,
.rich-editor strike {
    text-decoration: line-through;
}

/* Formatted description display in project cards/modals */
.formatted-description b,
.formatted-description strong {
    font-weight: 600;
    color: var(--text-primary);
}

.formatted-description i,
.formatted-description em {
    font-style: italic;
}

.formatted-description u {
    text-decoration: underline;
}

.formatted-description s,
.formatted-description strike {
    text-decoration: line-through;
    opacity: 0.7;
}

/* ============================================
   Easter Eggs - Hack Mode Theme
   ============================================ */
[data-theme="hack"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0d1117;
    --bg-tertiary: #161b22;
    --text-primary: #00ff00;
    --text-secondary: #39ff14;
    --text-muted: #30a830;
    --accent-primary: #00ff00;
    --accent-secondary: #39ff14;
    --accent-gradient: linear-gradient(135deg, #00ff00, #39ff14);
    --border-color: #30a830;
    --card-bg: #0d1117;
    --card-shadow: 0 4px 6px -1px rgba(0, 255, 0, 0.2), 0 2px 4px -2px rgba(0, 255, 0, 0.2);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 255, 0, 0.3), 0 8px 10px -6px rgba(0, 255, 0, 0.3);
    --nav-bg: rgba(10, 10, 10, 0.95);
    --code-bg: #000000;
    --success: #00ff00;
    --warning: #ffff00;
    --error: #ff0000;
}

[data-theme="hack"] body {
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

[data-theme="hack"] .hero-title {
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5), 0 0 20px rgba(0, 255, 0, 0.3);
    animation: glitch 2s infinite;
}

[data-theme="hack"] .code-window {
    border: 1px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

[data-theme="hack"] .skill-tag:hover,
[data-theme="hack"] .btn-primary {
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

[data-theme="hack"] a {
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 1px);
    }
    94% {
        transform: translate(2px, -1px);
    }
    96% {
        transform: translate(-1px, 2px);
    }
    98% {
        transform: translate(1px, -2px);
    }
}

/* Matrix rain effect container */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

/* ============================================
   Easter Eggs - Party Mode Theme
   ============================================ */
[data-theme="party"] {
    animation: partyBg 3s linear infinite;
}

[data-theme="party"] .hero-title {
    animation: rainbow 2s linear infinite;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes partyBg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

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

/* ============================================
   Easter Eggs - Retro Mode Theme
   ============================================ */
[data-theme="retro"] {
    --bg-primary: #2c1a4d;
    --bg-secondary: #3d2066;
    --bg-tertiary: #4e2a80;
    --text-primary: #ff6ec7;
    --text-secondary: #ffd700;
    --text-muted: #ff9ec4;
    --accent-primary: #00ffff;
    --accent-secondary: #ff6ec7;
    --accent-gradient: linear-gradient(135deg, #ff6ec7, #00ffff);
    --border-color: #ff6ec7;
    --card-bg: #3d2066;
    --nav-bg: rgba(44, 26, 77, 0.95);
    --code-bg: #1a0a2e;
}

[data-theme="retro"] .hero-title {
    text-shadow: 3px 3px 0 #00ffff, -3px -3px 0 #ff6ec7;
}

[data-theme="retro"] body {
    font-family: 'Courier New', monospace;
}

/* ============================================
   Custom Cursor Styles
   ============================================ */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10002;
    transition: transform 0.1s ease, border-color 0.2s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.1);
}

.custom-cursor-dot {
    width: 5px;
    height: 5px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10003;
    transform: translate(-50%, -50%);
}

/* Hide custom cursor on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
}

/* ============================================
   Easter Egg Toast Notification
   ============================================ */
.easter-egg-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-primary);
}

.easter-egg-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.easter-egg-toast i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.easter-egg-toast .message {
    display: flex;
    flex-direction: column;
}

.easter-egg-toast .title {
    font-weight: 600;
    font-size: 1rem;
}

.easter-egg-toast .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Konami Code special effect */
.konami-active .hero-visual {
    animation: spin3d 2s ease-in-out;
}

@keyframes spin3d {
    0% { transform: perspective(1000px) rotateY(0deg); }
    100% { transform: perspective(1000px) rotateY(360deg); }
}

/* Secret Click Counter Badge */
.click-counter-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--accent-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

.click-counter-badge.show {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Anime Mode Theme
   ============================================ */
[data-theme="anime"] {
    --bg-primary: #fff0f5;
    --bg-secondary: #ffe4ec;
    --bg-tertiary: #ffd6e0;
    --text-primary: #ff69b4;
    --text-secondary: #ff85c1;
    --text-muted: #ffadd2;
    --accent-primary: #ff69b4;
    --accent-secondary: #ff1493;
    --accent-gradient: linear-gradient(135deg, #ff69b4, #ff1493);
    --border-color: #ffb6c1;
    --card-bg: #fff5f8;
    --nav-bg: rgba(255, 240, 245, 0.95);
    --code-bg: #2d1f2d;
}

[data-theme="anime"] .hero-title {
    background: linear-gradient(135deg, #ff69b4, #ff1493, #da70d6, #ff69b4);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Sparkle Effect */
.sparkle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 0%, #ff69b4 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    animation: sparkleAnim 2s ease-out forwards;
}

@keyframes sparkleAnim {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* Floating Hearts */
.floating-heart {
    position: fixed;
    bottom: -50px;
    font-size: 24px;
    pointer-events: none;
    z-index: 10000;
    animation: floatUp 4s ease-out forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Naruto Running Effect */
.naruto-run .project,
.naruto-run .highlight-card,
.naruto-run .skill-category {
    transform: skewX(-5deg);
    transition: transform 0.3s ease;
}

.naruto-run .hero-visual {
    animation: narutoRun 0.5s infinite alternate;
}

@keyframes narutoRun {
    0% { transform: translateX(-10px) skewX(-10deg); }
    100% { transform: translateX(10px) skewX(-10deg); }
}

/* Shadow Clone */
.shadow-clone {
    animation: fadeClone 2s ease-out forwards;
}

@keyframes fadeClone {
    0% { opacity: 0.5; }
    100% { opacity: 0; transform: translate(100px, 100px); }
}

/* ============================================
   Game Modal Styles
   ============================================ */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    animation: slideUp 0.3s ease;
}

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

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.game-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.game-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-close-btn:hover {
    background: var(--error);
    color: #fff;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.game-container canvas {
    border-radius: var(--border-radius-sm);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.game-instructions {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.game-score {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0;
}

/* Tic Tac Toe Board */
.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--border-color);
    padding: 8px;
    border-radius: var(--border-radius-sm);
}

.ttt-cell {
    width: 80px;
    height: 80px;
    background: var(--card-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ttt-cell:hover {
    background: var(--bg-tertiary);
}

.ttt-cell.x {
    color: var(--accent-primary);
}

.ttt-cell.o {
    color: var(--error);
}

.game-status {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 8px 0;
}

/* Mobile Game Adjustments */
@media (max-width: 768px) {
    .game-modal-content {
        padding: 16px;
        max-width: 95vw;
    }
    
    .game-container canvas {
        max-width: 100%;
        height: auto;
    }
    
    .ttt-cell {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    #dino-canvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    
    #snake-canvas {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    #flappy-canvas {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
}

/* ============================================
   Easter Eggs List Modal
   ============================================ */
.eggs-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.eggs-list-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.eggs-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.eggs-list-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.eggs-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eggs-close-btn:hover {
    background: var(--error);
    color: #fff;
}

.eggs-subtitle {
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

.egg-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.egg-item:hover {
    background: var(--accent-primary);
    color: #fff;
}

.egg-item:hover .egg-trigger {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.egg-trigger {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    display: inline-block;
    width: fit-content;
}

.egg-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.egg-item:hover .egg-desc {
    color: rgba(255, 255, 255, 0.9);
}

.eggs-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin: 0;
}

/* ============================================
   Live Coding Playground Section
   ============================================ */
.playground-section {
    background: var(--bg-primary);
    padding: var(--section-padding);
}

.playground-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
    text-align: center;
}

.playground-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.code-editor-wrapper,
.output-wrapper {
    background: var(--code-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.editor-header,
.output-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
}

.editor-title,
.output-title {
    margin-left: auto;
    margin-right: auto;
    color: #94a3b8;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.output-title {
    margin-left: 0;
}

.run-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.run-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: var(--error);
    color: #fff;
}

.snippets-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.snippets-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

.snippets-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--card-shadow-hover);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    flex-direction: column;
}

.snippets-menu.active {
    display: flex;
}

.snippet-item {
    padding: 12px 16px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.snippet-item:last-child {
    border-bottom: none;
}

.snippet-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.clear-output-btn {
    padding: 4px 8px;
    background: transparent;
    color: #94a3b8;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.clear-output-btn:hover {
    color: var(--error);
}

.code-input {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    background: var(--code-bg);
    color: #e2e8f0;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.code-input::placeholder {
    color: #64748b;
}

.code-output {
    min-height: 300px;
    padding: 16px;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-y: auto;
}

.output-placeholder {
    color: #64748b;
    margin: 0;
}

.output-line {
    margin: 4px 0;
    padding: 4px 8px;
    border-radius: 4px;
}

.output-line.log {
    color: #e2e8f0;
}

.output-line.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.output-line.warn {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.output-line.result {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.playground-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.playground-hint code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

/* Playground responsive */
@media (max-width: 768px) {
    .playground-container {
        grid-template-columns: 1fr;
    }
    
    .code-input,
    .code-output {
        min-height: 200px;
    }
    
    .eggs-grid {
        grid-template-columns: 1fr;
    }
}
