* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.22), 0 10px 24px rgba(15, 23, 42, 0.14);
    --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.16), 0 12px 32px rgba(99, 102, 241, 0.28);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background-color: #f4f7ff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 42vmax;
    height: 42vmax;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: -3;
    opacity: 0.28;
}

body::before {
    top: -12vmax;
    left: -10vmax;
    background: radial-gradient(circle at 30% 30%, #68d2ff 0%, #4f46e5 45%, transparent 70%);
    animation: floatBlobA 16s ease-in-out infinite alternate;
}

body::after {
    right: -14vmax;
    bottom: -16vmax;
    background: radial-gradient(circle at 35% 35%, #34d399 0%, #0891b2 42%, transparent 72%);
    animation: floatBlobB 18s ease-in-out infinite alternate;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(1200px 700px at 8% 12%, rgba(99, 102, 241, 0.24) 0%, rgba(99, 102, 241, 0) 58%),
        radial-gradient(900px 500px at 88% 6%, rgba(6, 182, 212, 0.18) 0%, rgba(6, 182, 212, 0) 62%),
        linear-gradient(165deg, #eef3ff 0%, #f7fbff 48%, #eefaf6 100%);
    opacity: 1;
    pointer-events: none;
    z-index: -2;
}

.background-gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(30, 41, 59, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.045) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
    opacity: 0.35;
}

.background-gradient::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(5, 12, 26, 0.32), rgba(5, 12, 26, 0.32)),
        url("./beyond the other side.gif");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.6;
    mix-blend-mode: normal;
    animation: bgPan 24s ease-in-out infinite alternate;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideDown 0.6s ease-out;
    position: relative;
    padding: 28px 18px;
}

.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    z-index: -1;
}

.title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    background: linear-gradient(130deg, #4f46e5 0%, #2563eb 36%, #0ea5e9 68%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 10px 30px rgba(37, 99, 235, 0.28), 0 2px 0 rgba(255, 255, 255, 0.35);
    filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.18));
    position: relative;
}

.subtitle {
    font-size: 1.25rem;
    color: #1e3a8a;
    font-weight: 600;
    letter-spacing: 0.015em;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.65);
    opacity: 0.92;
}

.subtitle::before,
.subtitle::after {
    content: "";
    display: inline-block;
    width: 52px;
    height: 2px;
    margin: 0 12px;
    vertical-align: middle;
    background: linear-gradient(90deg, rgba(30, 58, 138, 0), rgba(30, 58, 138, 0.7), rgba(20, 184, 166, 0));
}

/* Description Section */
.description-section {
    margin-bottom: 60px;
}

.description-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.2);
    animation: fadeIn 0.6s ease-out 0.1s backwards;
}

.description-card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.description-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Section Title */
.section-title {
    display: block;
    width: fit-content;
    margin: 0 auto 40px;
    padding: 6px 14px;
    text-align: center;
    font-size: 1.95rem;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 14px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Download Section */
.download-section {
    margin-bottom: 60px;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.download-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: none;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.download-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.platform-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.download-card:hover .platform-icon {
    transform: scale(1.1) rotate(5deg);
}

.android-icon {
    background: transparent;
    box-shadow: none;
}

.platform-logo {
    width: 128px;
    height: 128px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.download-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.platform-version {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: 12px;
    font-size: 0.9rem;
}

.file-name {
    color: var(--primary-color);
    font-weight: 600;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Button Styles */
.download-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-glow);
}

.download-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.22), 0 16px 40px rgba(99, 102, 241, 0.38);
}

.download-btn:active {
    transform: scale(0.98);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-strong);
    animation: slideUp 0.4s ease-out;
}

.progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-container h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.4rem;
}

/* Loading Animation */
.loading-animation {
    text-align: center;
    margin: 30px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#loadingText {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Progress Bar */
.progress-bar-container {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Download Details */
.download-details {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Button Styles */
.cancel-btn,
.reset-btn,
.retry-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.cancel-btn {
    background-color: var(--danger-color);
    color: white;
}

.cancel-btn:hover {
    background-color: #dc2626;
    transform: scale(1.02);
}

/* Message Sections */
.message-section {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: var(--shadow-strong);
    animation: slideUp 0.4s ease-out;
    max-width: 600px;
    margin: 40px auto;
}

.success-message,
.error-message {
    text-align: center;
}

.success-icon,
.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: scaleIn 0.5s ease-out;
}

.success-icon {
    background-color: #d1fae5;
    color: var(--secondary-color);
}

.error-icon {
    background-color: #fee2e2;
    color: var(--danger-color);
}

.success-message h3,
.error-message h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.success-message p,
.error-message p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.reset-btn,
.retry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reset-btn:hover,
.retry-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Features Section */
.features-section {
    margin-top: 80px;
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: #0f172a;
    border-top: 1px solid rgba(15, 23, 42, 0.22);
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.footer p {
    font-weight: 600;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatBlobA {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(3vmax, 2vmax) scale(1.12);
    }
}

@keyframes floatBlobB {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(-4vmax, -2vmax) scale(1.1);
    }
}

@keyframes bgPan {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.06) translate3d(-1.2%, -1.2%, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body::before,
    body::after {
        width: 54vmax;
        height: 54vmax;
        opacity: 0.2;
    }

    .background-gradient::before {
        opacity: 0.2;
        background-size: 30px 30px;
    }

    .background-gradient::after {
        opacity: 0.34;
    }

    .header {
        padding: 24px 14px;
    }

    .title {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.05rem;
    }

    .subtitle::before,
    .subtitle::after {
        width: 34px;
        margin: 0 8px;
    }

    .section-title {
        font-size: 1.6rem;
        padding: 5px 12px;
    }

    .description-card {
        padding: 25px;
    }

    .description-card h2 {
        font-size: 1.4rem;
    }

    .download-card {
        padding: 20px;
    }

    .download-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .progress-section {
        padding: 25px;
    }

    .message-section {
        padding: 30px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .container {
        padding: 20px 15px;
    }

    .header {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    body::before,
    body::after {
        animation: none;
        filter: blur(40px);
        opacity: 0.16;
    }

    .background-gradient::before {
        opacity: 0.14;
        background-size: 26px 26px;
    }

    .background-gradient::after {
        opacity: 0.28;
        animation: none;
    }

    .header {
        padding: 18px 10px;
    }

    .title {
        font-size: 2.1rem;
    }

    .subtitle {
        font-size: 0.92rem;
    }

    .subtitle::before,
    .subtitle::after {
        display: none;
    }

    .section-title {
        font-size: 1.25rem;
        padding: 4px 10px;
    }

    .download-card {
        padding: 15px;
    }

    .platform-icon {
        width: 90px;
        height: 90px;
    }

    .platform-logo {
        width: 78px;
        height: 78px;
    }

    .download-card h3 {
        font-size: 1.2rem;
    }

    .download-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .progress-section {
        padding: 20px;
    }

    .message-section {
        padding: 25px 15px;
    }

    .success-icon,
    .error-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }
}

/* Accessibility */
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .background-gradient::after,
    body::before,
    body::after {
        animation: none;
    }
}
