* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #2F353B; /* тёмно-серый фон */
    --surface: #3A3D43; /* поверхность карточек */
    --surface-2: #323639;
    --surface-3: #2A2D31;
    --accent: #FFCC00; /* ярко-желтый */
    --accent-secondary: #FF5500; /* оранжевый */
    --accent-gradient: var(--accent);
    --text: #FFFFFF;
    --text-secondary: #CCCCCC;
    --text-light: #E5E5E5;
    --border: #3A3D43;
    --orange-glow: rgba(255, 85, 0, 0.18);
    --yellow-glow: rgba(255, 204, 0, 0.18);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
}

.screen {
    display: none;
    padding: 20px;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

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

/* Header */
.screen-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.back-btn {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--accent-secondary);
}

.back-btn svg {
    width: 18px;
    height: 18px;
    color: #000;
}

.screen-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.screen-title.centered {
    text-align: center;
}

/* Main Screen */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 60px;
}

.logo {
    width: 100px;
    height: 100px;
    background: var(--accent-gradient);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px var(--orange-glow);
}

.logo svg {
    width: 60px;
    height: 60px;
}

.badge {
    display: inline-block;
    background: rgba(255, 204, 0, 0.12);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.features {
    width: 100%;
    margin-bottom: 32px;
}

.feature-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.feature-card:hover {
    background: var(--surface-2);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-text p {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.feature-text span {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    padding: 18px 28px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 18px var(--yellow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px var(--yellow-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

/* Form Screen */
.form-section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-number {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    color: #000;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.section-title {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.photo-upload {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-upload:hover {
    border-color: var(--accent);
}

.photo-upload.success {
    border-color: var(--accent-secondary);
    border-style: solid;
    background: rgba(255, 204, 0, 0.05);
}

.upload-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.upload-icon svg {
    width: 28px;
    height: 28px;
}

.upload-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 14px;
}

.upload-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-success svg {
    width: 36px;
    height: 36px;
}

.upload-success p {
    font-weight: 700;
    color: var(--accent-secondary);
    font-size: 16px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.form-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--orange-glow);
}

.input-btn {
    width: 54px;
    height: 54px;
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.input-btn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.input-btn svg {
    width: 22px;
    height: 22px;
    color: #000; /* сделать иконку чёрной для контраста на желтой кнопке */
}

.form-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 10px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: var(--surface-2);
    border-color: var(--accent);
}

.radio-option input {
    display: none;
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.radio-option input:checked + .radio-custom {
    border-color: var(--accent);
    background: var(--accent);
}

.radio-option input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
}

.radio-option input:checked ~ .radio-text {
    color: var(--accent);
}

.radio-text {
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

/* Processing Screen */
.processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 40px;
}

.processing-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--surface);
    border-radius: 100px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -22px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 100;
}

.confetti-piece {
    position: absolute;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.checklist {
    width: 100%;
    margin-bottom: 28px;
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 16px 18px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.check-item.active {
    opacity: 1;
    transform: translateX(0);
    border-color: var(--accent);
    background: rgba(255, 204, 0, 0.05);
    animation: pulse-border 2s ease infinite;
}

.check-item.completed {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--accent); }
    50% { border-color: rgba(255, 204, 0, 0.3); }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.check-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-icon svg {
    width: 18px;
    height: 18px;
}

.check-item span {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
    text-align: left;
}

.reward-card {
    background: var(--accent-gradient);
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    margin-bottom: 20px;
}

.reward-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.reward-amount {
    font-size: 52px;
    font-weight: 800;
    color: #000;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.reward-desc {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.btn-reward {
    margin-top: 24px;
}

/* Loading Screen */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--surface-2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Subscription Screen */
.warning-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: var(--radius);
    padding: 16px 18px 16px 16px;
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.36s cubic-bezier(.22,.9,.32,1), opacity 0.36s ease;
}

.warning-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: #000;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 8px 24px var(--yellow-glow);
}

.warning-title {
    font-weight: 800;
    color: var(--accent-secondary);
    margin-bottom: 6px;
    font-size: 16px;
}

.warning-card.slide-in {
    transform: translateY(0);
    opacity: 1;
}

.subscription-bg {
    background: rgba(229,229,229,0.04);
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.warning-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.channels-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.channels-list {
    margin-bottom: 24px;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    padding: 16px 18px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.channel-item:hover {
    background: var(--surface-2);
    transform: translateX(4px);
}

.channel-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #000;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 8px 24px var(--yellow-glow);
}

.channel-icon svg { color: #000; }

.channel-name {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

.channel-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.channel-item:hover .channel-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* Subscription screen specific tweaks */
#screen-subscription .screen-title {
    font-size: 28px;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 360px) {
    .title {
        font-size: 32px;
    }
    
    .btn-primary {
        padding: 16px 20px;
        font-size: 15px;
    }
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--accent);
    color: #000;
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(255, 85, 0, 0.3); }
    50% { box-shadow: 0 8px 48px rgba(255, 85, 0, 0.5); }
}
