/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* iOS 26 Dark Mode Color Palette - Liquid Glass */
    --bg-primary: #000000;
    --bg-secondary: rgba(28, 28, 30, 0.4);
    --bg-tertiary: rgba(44, 44, 46, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-blue: #0A84FF;
    --accent-purple: #AF52DE;
    --accent-cyan: #64D2FF;
    --gradient-primary: linear-gradient(135deg, #0A84FF 0%, #AF52DE 50%, #64D2FF 100%);
    --gradient-glass: linear-gradient(135deg, rgba(28, 28, 30, 0.25) 0%, rgba(44, 44, 46, 0.15) 100%);
    --gradient-glass-hover: linear-gradient(135deg, rgba(10, 132, 255, 0.15) 0%, rgba(175, 82, 222, 0.1) 100%);
    --shadow-soft: 0 2px 20px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 12px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(10, 132, 255, 0.4);
    --shadow-liquid: 0 8px 32px rgba(10, 132, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --border-radius: 24px;
    --border-radius-small: 16px;
    --border-radius-large: 32px;
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-fast: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-spring: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-liquid: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(10, 132, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(175, 82, 222, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(100, 210, 255, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(10, 132, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(175, 82, 222, 0.08) 0%, transparent 40%);
    animation: liquidMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes liquidMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.9;
    }
}

/* Header Section */
.header-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: filter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, filter;
}

.header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3), var(--bg-primary));
    z-index: 2;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.header-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: floatContent 6s ease-in-out infinite;
}

@keyframes floatContent {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.brand-name {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-description {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 4;
    background: rgba(0, 0, 0, 0.6);
    margin-top: -2rem;
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
    padding: 4rem 0 2rem;
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards Section */
.cards-section {
    padding: 0 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: var(--gradient-glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-liquid);
    border: none;
    outline: none;
    position: relative;
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    box-shadow: var(--shadow-liquid);
    transform-style: preserve-3d;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

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

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(10, 132, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-liquid), transform var(--transition-liquid);
    transform: scale(0.5);
    z-index: 0;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.02) rotateX(2deg);
    box-shadow: 
        var(--shadow-medium), 
        var(--shadow-glow),
        0 0 40px rgba(10, 132, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    outline: none;
    background: var(--gradient-glass-hover);
    backdrop-filter: blur(80px) saturate(200%);
    -webkit-backdrop-filter: blur(80px) saturate(200%);
}

.card:active {
    transform: translateY(-4px) scale(1) rotateX(1deg);
    transition: var(--transition-fast);
}

.card:hover::before {
    opacity: 1;
    transform: scale(1);
}

.card-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    z-index: 2;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-liquid);
    filter: brightness(0.9);
}

.card:hover .card-image {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.1);
}

.card-title {
    padding: 1.625rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 2;
    position: relative;
    text-align: center;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-liquid);
}

.card:hover .card-title {
    transform: translateY(-2px);
}

/* Links Section */
.links-section {
    padding: 0 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-button {
    display: flex;
    align-items: center;
    padding: 1.375rem 1.625rem;
    background: var(--gradient-glass);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.125rem;
    transition: var(--transition-liquid);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    box-shadow: var(--shadow-liquid);
    min-height: 60px;
    transform-style: preserve-3d;
}

.link-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

.link-button:hover::after {
    width: 300px;
    height: 300px;
    opacity: 1;
}

.link-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(10, 132, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-liquid), transform var(--transition-liquid);
    transform: scale(0.5);
    z-index: 0;
    pointer-events: none;
}

.link-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        var(--shadow-medium), 
        var(--shadow-glow),
        0 0 30px rgba(10, 132, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    outline: none;
    background: var(--gradient-glass-hover);
    backdrop-filter: blur(80px) saturate(200%);
    -webkit-backdrop-filter: blur(80px) saturate(200%);
}

.link-button:hover::before {
    opacity: 1;
    transform: scale(1);
}

.link-button:active {
    transform: translateY(-2px) scale(1);
    transition: var(--transition-fast);
}

.link-icon {
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-liquid);
}

.link-button:hover .link-icon {
    transform: scale(1.15) rotate(5deg);
}

.link-text {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-liquid);
}

.link-button:hover .link-text {
    transform: translateX(4px);
}

/* Specific link button styles */
.link-button.website:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.2);
}

.link-button.telegram:hover {
    border-color: #229ED9;
    box-shadow: 0 8px 30px rgba(34, 158, 217, 0.2);
}

.link-button.youtube:hover {
    border-color: #FF0000;
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.25);
}

/* Footer */
.footer {
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Responsive Design - Cards always vertical */
@media (min-width: 768px) {
    .cards-container {
        max-width: 600px;
        gap: 1.75rem;
    }
    
    .card-image-container {
        height: 250px;
    }
    
    .main-content {
        margin-top: -4rem;
        padding: 6rem 0 2rem;
    }
    
    .cards-section {
        padding: 0 2rem 4rem;
    }
    
    .links-section {
        padding: 0 2rem;
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    .cards-container {
        max-width: 650px;
        gap: 2rem;
    }
    
    .card-image-container {
        height: 280px;
    }
    
    .main-content {
        margin-top: -6rem;
        padding: 8rem 0 2rem;
    }
    
    .cards-section {
        padding: 0 3rem 5rem;
    }
    
    .links-section {
        padding: 0 3rem;
        max-width: 650px;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .cards-container {
        gap: 1.25rem;
        max-width: 100%;
        padding: 0 .25rem;
    }

    .card-image-container {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    /* If still tall on some devices, specifically reduce first card height */
    .cards-container .card:first-child .card-image-container {
        aspect-ratio: 16 / 10;
    }

    .card-title {
        padding: 1.25rem 1rem;
        font-size: 1.125rem;
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 122, 255, 0.6);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Focus styles for accessibility - iOS style */
.link-button:focus,
.card:focus {
    outline: none;
    box-shadow: 
        var(--shadow-medium), 
        0 0 0 3px rgba(10, 132, 255, 0.3);
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.card.loading {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* LTR Support - iOS 26 style */
[dir="ltr"] .link-text {
    text-align: left;
}

[dir="ltr"] .link-icon {
    margin-right: 1rem;
    margin-left: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #ffffff;
        --text-muted: #cccccc;
        --border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .header-image {
        transition: none;
    }
}
