/* ===== CSS Variables - White, Black & Gold Theme ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #fffdf8;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-dark: #000000;
    --gold-light: #f4d03f;
    --gold-primary: #d4af37;
    --gold-dark: #b8860b;
    --gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8860b 100%);
    --gold-gradient-soft: linear-gradient(135deg, #ffeaa7 0%, #f4d03f 50%, #d4af37 100%);
    --black-gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
    --glass-border: rgba(212, 175, 55, 0.2);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 20px 50px rgba(212, 175, 55, 0.25);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== Subtle Background Pattern ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(244, 208, 63, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212, 175, 55, 0.06), transparent),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(184, 134, 11, 0.03), transparent);
}

/* Decorative gold accents */
.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 208, 63, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.bg-animation::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* ===== Header ===== */
.header {
    padding: 50px 20px 30px;
    text-align: center;
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 0) 100%);
}

.header-content {
    max-width: 700px;
    margin: 0 auto;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-gradient);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.logo-icon i {
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-main {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--black-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -1px;
}

.logo-sub {
    font-size: 1.4rem;
    font-weight: 600;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 25px;
    font-weight: 400;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 450px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 16px 22px 16px 55px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== Main Content ===== */
.main-content {
    padding: 40px 20px 60px;
    position: relative;
    z-index: 10;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== App Card - Elegant White & Gold ===== */
.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 20px 30px;
    background: var(--bg-card);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}

.app-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(244, 208, 63, 0.1), transparent);
    transition: 0.6s;
}

.app-card:hover::after {
    left: 100%;
}

.app-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--gold-primary);
    background: var(--bg-card-hover);
}

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

/* App Icon - Gold Accent */
.app-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-gradient);
    border-radius: 22px;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.app-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
}

.app-icon i {
    font-size: 2rem;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.45);
}

/* App Info */
.app-info {
    position: relative;
    z-index: 1;
    text-align: center;
}

.app-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: var(--transition);
    line-height: 1.3;
    color: var(--text-dark);
}

.app-card:hover .app-info h3 {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    line-height: 1.4;
}

.app-card:hover .app-info p {
    color: var(--text-primary);
}

/* App Badge */
.app-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hidden state for filtering */
.app-card.hidden {
    display: none;
}

/* ===== Footer ===== */
.footer {
    padding: 50px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #fff 100%);
    border-top: 1px solid #e5e7eb;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.footer-brand i {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-links a:hover {
    background: var(--gold-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35);
}

/* ===== Responsive Design ===== */

/* Large Desktop */
@media (max-width: 1400px) {
    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
        padding: 0 20px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (max-width: 900px) {
    .header {
        padding: 40px 20px 25px;
    }

    .logo-icon {
        width: 65px;
        height: 65px;
    }

    .logo-main {
        font-size: 2.2rem;
    }

    .logo-sub {
        font-size: 1.1rem;
        letter-spacing: 4px;
    }

    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .app-card {
        padding: 28px 18px 25px;
    }

    .app-icon {
        width: 70px;
        height: 70px;
    }

    .app-icon i {
        font-size: 1.7rem;
    }
}

/* Small Tablet */
@media (max-width: 768px) {
    .logo {
        flex-direction: column;
        gap: 12px;
    }

    .logo-text {
        align-items: center;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .search-box {
        max-width: 100%;
    }

    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .app-card {
        padding: 25px 15px 22px;
        border-radius: 20px;
    }

    .app-badge {
        top: 12px;
        right: 12px;
        font-size: 0.6rem;
        padding: 5px 10px;
    }

    .app-info h3 {
        font-size: 0.95rem;
    }

    .app-info p {
        font-size: 0.8rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header {
        padding: 30px 15px 20px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .logo-icon i {
        font-size: 1.7rem;
    }

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

    .logo-sub {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .tagline {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }

    .search-box input {
        padding: 14px 18px 14px 48px;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 25px 12px 50px;
    }

    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .app-card {
        padding: 22px 12px 20px;
        border-radius: 18px;
    }

    .app-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        margin-bottom: 15px;
    }

    .app-icon i {
        font-size: 1.5rem;
    }

    .app-info h3 {
        font-size: 0.85rem;
    }

    .app-info p {
        font-size: 0.75rem;
    }

    .app-badge {
        font-size: 0.55rem;
        padding: 4px 8px;
        top: 10px;
        right: 10px;
    }

    .footer {
        padding: 35px 15px;
    }

    .footer-brand {
        font-size: 1.2rem;
    }

    .footer p {
        font-size: 0.8rem;
    }

    .footer-links a {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .apps-grid {
        gap: 10px;
    }

    .app-card {
        padding: 18px 10px 16px;
    }

    .app-icon {
        width: 52px;
        height: 52px;
    }

    .app-icon i {
        font-size: 1.3rem;
    }

    .app-info h3 {
        font-size: 0.8rem;
    }

    .app-info p {
        font-size: 0.7rem;
    }
}

/* ===== Loading Animation ===== */
.app-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.app-card:nth-child(1) { animation-delay: 0.05s; }
.app-card:nth-child(2) { animation-delay: 0.1s; }
.app-card:nth-child(3) { animation-delay: 0.15s; }
.app-card:nth-child(4) { animation-delay: 0.2s; }
.app-card:nth-child(5) { animation-delay: 0.25s; }
.app-card:nth-child(6) { animation-delay: 0.3s; }
.app-card:nth-child(7) { animation-delay: 0.35s; }
.app-card:nth-child(8) { animation-delay: 0.4s; }
.app-card:nth-child(9) { animation-delay: 0.45s; }
.app-card:nth-child(10) { animation-delay: 0.5s; }
.app-card:nth-child(11) { animation-delay: 0.55s; }
.app-card:nth-child(12) { animation-delay: 0.6s; }
.app-card:nth-child(13) { animation-delay: 0.65s; }
.app-card:nth-child(14) { animation-delay: 0.7s; }
.app-card:nth-child(15) { animation-delay: 0.75s; }
.app-card:nth-child(16) { animation-delay: 0.8s; }
.app-card:nth-child(17) { animation-delay: 0.85s; }
.app-card:nth-child(18) { animation-delay: 0.9s; }
.app-card:nth-child(19) { animation-delay: 0.95s; }
.app-card:nth-child(20) { animation-delay: 1s; }
.app-card:nth-child(21) { animation-delay: 1.05s; }

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

/* ===== Ripple Effect ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-dark) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
}

/* ===== Selection ===== */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: var(--text-dark);
}
