@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #4D7EFF;
    --primary-hover: #5D8EFF;
    --secondary-color: #FF6B4D;
    --secondary-hover: #FF7D64;
    --background-color: #121721;
    --surface-color: #1A202C;
    --card-color: #1E2634;
    --sidebar-color: #141E2F;
    --border-color: #2D3748;
    --text-primary: #F0F4F8;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;
    --text-danger: #FF5E5B;
    --input-bg: #1A202C;
    --input-border: #2D3748;
    --input-focus-border: #4D7EFF;
    --input-focus-shadow: rgba(77, 126, 255, 0.25);
    --danger: #FF5E5B;
    --success: #38A169;
    --warning: #ECC94B;
    --status-released: #38A169;
    --status-beta: #DD6B20;
    --status-dev: #718096;
    --status-development: #718096;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 15px 25px rgba(0, 0, 0, 0.6);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), #3A66CC);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #E65642);
    --gradient-card: linear-gradient(135deg, var(--card-color), var(--surface-color));
    --hero-gradient: linear-gradient(135deg, #1a202c, #1a202c);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Common Elements */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
}

/* ===== NAVIGATION ===== */
.navbar {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.img {
    height: 30px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.logo-link:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu */
    padding: 0.5rem;
    z-index: 20000;
}

.menu-toggle:focus {
    outline: none;
}

/* Mobile menu overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin: 2rem auto;
    width: 100%;
}

/* --- NEW HOMEPAGE STYLES --- */

/* ===== HERO HEADER ===== */
.hero-header {
    background: var(--hero-gradient);
    padding: 4rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    opacity: 0.05;
    z-index: 0;
}

.hero-header .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: end;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 150px;
}

.floating {
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.hero-wave svg {
    display: block;
    width: 100%;
}

/* When hero header is present, adjust main content margin */
.hero-header+.main-content {
    margin-top: -4rem;
    position: relative;
    z-index: 2;
}

/* ===== SCREENSHOTS SECTION ===== */
.screenshots-section {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.screenshot-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    background-color: var(--card-color);
}

.screenshot-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(77, 126, 255, 0.3);
}

.screenshot-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    display: block;
}

.screenshot-caption {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

/* ===== VERSION HISTORY TEASER ===== */
.version-history-teaser {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.version-teaser-content {
    padding: 1.5rem;
    text-align: center;
}

.version-teaser-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.version-teaser-actions {
    display: flex;
    justify-content: center;
}

/* END OF NEW HOMEPAGE STYLES */

/* ===== HERO CARD ===== */
.hero-card {
    background: linear-gradient(135deg, var(--card-color), var(--surface-color));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(90deg, rgba(77, 126, 255, 0), rgba(77, 126, 255, 0.08));
    transform: skewX(-15deg) translateX(50%);
    z-index: 0;
    pointer-events: none;
}

.hero-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    text-align: center;
}

.hero-loading-animation {
    margin-bottom: 1.5rem;
}

.hero-loading-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(77, 126, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.featured-tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(77, 126, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.featured-tag i {
    margin-right: 0.5rem;
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.featured-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.meta-item i {
    margin-right: 0.5rem;
    color: var(--text-muted);
}

.featured-description {
    margin: 1rem 0;
    color: var(--text-secondary);
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ===== BUTTONS ===== */
.primary-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: var(--shadow-sm);
    min-height: 2.75rem;
}

.primary-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button i {
    font-size: 0.875rem;
}

.secondary-button {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
}

.secondary-button:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.secondary-button:active {
    transform: translateY(0);
}

/* ===== VERSION SECTIONS ===== */
.version-section {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.section-action {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
}

.section-action:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* ===== VERSION TABLES ===== */
.version-table-container {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.version-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.version-table thead th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    width: auto;
}

.version-table tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.version-table tr:last-child td {
    border-bottom: none;
}

.version-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.table-loading {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.table-loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.loading-bar-container {
    width: 100%;
    height: 3px;
    background-color: rgba(77, 126, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 30%;
    background-color: var(--primary-color);
    border-radius: 3px;
    animation: loadingAnimation 1.5s infinite ease-in-out;
}

@keyframes loadingAnimation {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(300%);
    }
}

.loading-cell {
    position: relative;
    min-height: 24px;
}

.loading-pulse {
    height: 24px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    width: 70%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.3;
    }
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.status-released {
    background-color: rgba(56, 161, 105, 0.15);
    color: #68D391;
}

.status-beta {
    background-color: rgba(221, 107, 32, 0.15);
    color: #F6AD55;
}

.status-development {
    background-color: rgba(113, 128, 150, 0.15);
    color: #CBD5E0;
}

.status-badge i {
    margin-right: 0.375rem;
    font-size: 0.75rem;
}

.release-notes-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.release-notes-link:hover {
    color: var(--primary-hover);
    background-color: rgba(77, 126, 255, 0.1);
}

.play-button {
    background-color: rgba(77, 126, 255, 0.15);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(77, 126, 255, 0.3);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    min-height: 2.25rem;
    min-width: 120px;
    white-space: nowrap;
}

.play-button:hover {
    background-color: rgba(77, 126, 255, 0.25);
    transform: translateY(-1px);
}

.play-button:active {
    transform: translateY(0);
}

.play-button-td {
    text-align: end;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 2rem;
    margin-top: 2.5rem;
    background-color: var(--surface-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Footer info section */
.footer-info {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 30px;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Footer links container */
.footer-links-container {
    display: flex;
    gap: 3rem;
}

.footer-links-column {
    display: flex;
    flex-direction: column;
}

.footer-links-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.footer-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Footer bottom section */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-credits {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ===== TABLE COLUMN WIDTHS ===== */
.col-status {
    width: 120px;
}

.col-version {
    width: 100px;
}

.col-date {
    width: 150px;
}

.col-notes {
    width: auto;
}

.col-actions {
    width: 120px;
}

/* Hide br tags */
br {
    display: none;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-divider {
    margin: 0 0.5rem;
}

/* Release notes specific styles */
.release-header {
    background: linear-gradient(135deg, var(--card-color), var(--surface-color));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.release-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(90deg, rgba(77, 126, 255, 0), rgba(77, 126, 255, 0.08));
    transform: skewX(-15deg) translateX(50%);
    z-index: 0;
}

.version-tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(77, 126, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.version-tag i {
    margin-right: 0.5rem;
}

.version-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.version-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Release sections */
.release-section {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.section-content {
    padding: 1.5rem;
}

.section-content ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.section-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.section-content li:last-child {
    margin-bottom: 0;
}

.section-content li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0.25rem;
    top: 0;
}

.empty-section {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1100px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-header {
        padding: 3rem 0 7rem;
    }

    .hero-header+.main-content {
        margin-top: -3rem;
    }
}

@media (max-width: 900px) {
    .featured-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-header .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-header {
        padding: 2.5rem 0 6rem;
    }

    .hero-header+.main-content {
        margin-top: -2rem;
    }

    .footer-links-container {
        justify-content: space-between;
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Mobile Menu */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--surface-color);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        z-index: 1000;
        align-items: flex-start;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        right: 0;
        z-index: 10000;
    }

    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {

    .hero-card,
    .release-header {
        padding: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .header-content {
        padding: 1rem 0;
    }

    .version-table thead th,
    .version-table tbody td {
        padding: 0.875rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-info {
        text-align: center;
        max-width: none;
    }

    .footer-logo {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .featured-title,
    .version-title {
        font-size: 1.375rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {

    .col-date,
    .col-notes {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .version-table {
        table-layout: auto;
    }

    .col-status {
        width: auto;
    }

    .col-version {
        width: auto;
    }

    .col-actions {
        width: auto;
    }

    .status-badge {
        padding: 0.25rem 0.5rem;
    }

    .play-button {
        padding: 0.5rem 0.75rem;
        min-width: 70px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-header {
        padding: 2rem 0 5rem;
    }

    .hero-header+.main-content {
        margin-top: -1rem;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .footer-links-container {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .status-badge {
        font-size: 0.6875rem;
    }

    .version-table thead th,
    .version-table tbody td {
        padding: 0.75rem 0.625rem;
    }

    .version-table {
        font-size: 0.875rem;
    }

    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.625rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-header {
        padding: 1rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .section-content {
        padding: 1.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom {
        text-align: center;
    }
}

@media (max-width: 380px) {
    .logo {
        font-size: 1.125rem;
    }

    .play-button {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        min-width: 60px;
    }
}

/* iPhone-specific optimizations */
@supports (-webkit-touch-callout: none) {
    body {
        /* Prevent iOS Safari zooming on input elements */
        font-size: 16px;
    }

    /* Extra padding for buttons to make them easier to tap on iOS */
    .play-button,
    .primary-button,
    .secondary-button,
    .nav-link,
    .footer-link,
    .social-link,
    input[type="submit"] {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* Fix for iOS momentum scrolling */
    .version-table-container {
        -webkit-overflow-scrolling: touch;
    }

    /* Safe area insets for notched iPhones */
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(2.5rem, env(safe-area-inset-bottom) + 1rem);
    }
}

/* Animation for hero card */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-header+.main-content .hero-card {
    animation: slideUp 0.8s ease-out both;
}