/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #9b59b6;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    
    --bg-dark: #0a0e27;
    --bg-medium: #1a1f3a;
    --bg-light: #2d3561;
    --bg-card: rgba(45, 53, 97, 0.6);
    
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-muted: #7f8c8d;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, #16213e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(155, 89, 182, 0.1) 0%, transparent 50%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 8px 24px rgba(52, 152, 219, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite;
    line-height: 1.3;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 0.5px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Press Start 2P', cursive;
}

.stat-number.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(-45deg);
    margin: 0 auto;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== CONTROL BAR ===== */
.control-bar {
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
    padding: 1.5rem 0;
    transition: var(--transition-normal);
    position: sticky;
    top: 0;
    z-index: 100;
}

.control-bar.sticky {
    box-shadow: var(--shadow-lg);
}

.control-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    background: rgba(45, 53, 97, 0.5);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(45, 53, 97, 0.8);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(231, 76, 60, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.clear-search:hover {
    background: var(--accent-color);
    color: white;
}

.filter-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-chip {
    padding: 0.5rem 1.25rem;
    background: rgba(45, 53, 97, 0.5);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
    color: var(--text-primary);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 4rem 0;
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: rgba(45, 53, 97, 0.4);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
}

.about-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    padding: 3rem 0 5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.section-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--primary-color);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(45, 53, 97, 0.5);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(52, 152, 219, 0.3);
}

.view-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.view-btn svg {
    width: 20px;
    height: 20px;
}

.view-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* ===== CARDS ===== */
.cards-wrapper {
    position: relative;
    min-height: 400px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.card-container.list-view {
    grid-template-columns: 1fr;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
}

.card.fade-in {
    animation: cardFadeIn 0.5s ease-out forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(52, 152, 219, 0.5),
        inset 0 0 20px rgba(52, 152, 219, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.card-image-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.card-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
    flex: 1;
    transition: var(--transition-fast);
}

.card:hover .card-name {
    color: var(--primary-color);
}

.card-category {
    padding: 0.25rem 0.75rem;
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--primary-color);
    white-space: nowrap;
    font-weight: 500;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

/* List View Styles */
.list-view .card {
    flex-direction: row;
}

.list-view .card-image {
    width: 200px;
    height: auto;
    min-height: 150px;
}

.list-view .card-content {
    flex: 1;
}

/* ===== LOADING & EMPTY STATES ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(52, 152, 219, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
    gap: 1rem;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    opacity: 0.3;
}

.empty-state h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.95), rgba(10, 14, 39, 0.95));
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(52, 152, 219, 0.3);
    margin-top: 5rem;
    padding: 3rem 0 1.5rem;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-left h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.footer-left p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.button-style {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.button-style:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.button-style:active {
    transform: translateY(0);
}

.music-icon {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(52, 152, 219, 0.2);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: var(--transition-normal);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.error {
    border-color: var(--accent-color);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .control-content {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-chips {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-container {
        grid-template-columns: 1fr;
    }

    .list-view .card {
        flex-direction: column;
    }

    .list-view .card-image {
        width: 100%;
        height: 220px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .about-content {
        padding: 2rem 1.5rem;
    }

    .about-content h2 {
        font-size: 1.25rem;
    }

    .about-content p {
        font-size: 1rem;
    }

    .card-content {
        padding: 1.25rem;
    }

    .card-name {
        font-size: 0.75rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

