/* AniReko Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #14141f;
    --accent: #ff4757;
    --accent-green: #2ed573;
    --accent-yellow: #ffa502;
    --text: #f1f1f1;
    --text-muted: #888;
    --gradient: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Landing Page */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.landing-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(10,10,15,0.7) 0%,
        rgba(10,10,15,0.9) 50%,
        rgba(10,10,15,1) 100%
    );
    z-index: 1;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    animation: scroll 120s linear infinite;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-track:nth-child(2) {
    top: 20%;
    animation-direction: reverse;
    animation-duration: 90s;
}

.carousel-track:nth-child(3) {
    top: 80%;
    animation-duration: 100s;
}

.carousel-img {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    filter: blur(0.5px);
    flex-shrink: 0;
}

@keyframes scroll {
    0% { transform: translateY(-50%) translateX(0); }
    100% { transform: translateY(-50%) translateX(-50%); }
}

.landing-content {
    position: relative;
    z-index: 2;
}

.hero-box {
    background: rgba(10, 10, 15, 0.75);
    padding: 1.5rem 2.5rem 2rem;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    margin-bottom: 1.5rem;
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.logo {
    font-family: 'Unbounded', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.start-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.age-disclaimer {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

.btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 8px 32px rgba(255,71,87,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255,71,87,0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid #333;
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-icon {
    font-size: 1.4rem;
}

/* Quiz Page */
.quiz-container {
    display: none;
    min-height: 100vh;
    padding: 1rem;
    max-width: 420px;
    margin: 0 auto;
}

/* Desktop enhancements */
@media (min-width: 768px) {
    .quiz-container {
        display: none;
        padding: 2rem;
        max-width: 480px;
    }
    
    .anime-card {
        box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    }
    
    .reaction-buttons {
        padding: 2.5rem 1rem;
    }
    
    .reaction-btn {
        min-width: 110px;
        padding: 1rem 1.2rem;
        transition: all 0.2s ease;
    }
    
    .reaction-btn:hover {
        transform: scale(1.05);
    }
    
    .btn-icon {
        font-size: 2rem;
    }
    
    .btn-label {
        font-size: 0.75rem;
    }
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.user-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-like { color: #4ade80; }
.stat-dislike { color: #f87171; }
.stat-skip { color: #94a3b8; }

.close-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
}

.close-btn:hover {
    background: rgba(255,255,255,0.1);
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255,71,87,0.5);
}

.anime-card {
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    margin-bottom: 120px;
}

.anime-image-container {
    position: relative;
    width: 100%;
    height: 40vh; /* 40% экрана */
    min-height: 200px;
    max-height: 350px;
    background: #1a1a2e;
    overflow: hidden;
}

.anime-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, filter 0.3s ease, transform 0.3s ease;
}

.anime-image.loading {
    filter: blur(10px);
    transform: scale(1.1);
}

.anime-image.loaded {
    filter: blur(0);
    transform: scale(1);
}

/* Карусель картинок */
.carousel-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.carousel-images img.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 4px;
}

/* Desktop: больше места для картинки */
@media (min-width: 768px) {
    .anime-image-container {
        height: 45vh;
        max-height: 400px;
    }
}

/* Большие экраны */
@media (min-height: 900px) {
    .anime-image-container {
        height: 40vh;
        max-height: 450px;
    }
}

.anime-info {
    padding: 1.5rem;
}

.anime-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.anime-synopsis {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.reaction-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, var(--bg-dark) 30%);
    padding-top: 3rem;
}

.reaction-btn {
    min-width: 90px;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.reaction-btn:active {
    transform: scale(0.95);
}

.btn-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.btn-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.9;
    white-space: nowrap;
}

.btn-dislike {
    background: #2a2a3a;
    color: #ff6b6b;
}

.btn-dislike:hover {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 8px 24px rgba(255,107,107,0.3);
}

.btn-skip {
    background: #2a2a3a;
    color: var(--accent-yellow);
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
}

.btn-skip:hover {
    background: var(--accent-yellow);
    color: white;
}

.btn-like {
    background: #2a2a3a;
    color: var(--accent-green);
}

.btn-like:hover {
    background: var(--accent-green);
    color: white;
    box-shadow: 0 8px 24px rgba(46,213,115,0.3);
}

/* Results Page */
.results-container {
    display: none;
    min-height: 100vh;
    padding: 2rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.taste-profile {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
}

.rec-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rec-item {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 16px;
    transition: transform 0.2s;
}

.rec-item:hover {
    transform: translateX(8px);
}

.rec-image {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.rec-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.rec-info .tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.rec-info .tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.rec-info .synopsis {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.restart-btn {
    display: block;
    width: 100%;
    margin-top: 2rem;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-out-left {
    animation: slideOutLeft 0.3s ease forwards;
}

@keyframes slideOutLeft {
    to { opacity: 0; transform: translateX(-100px); }
}

.slide-out-right {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to { opacity: 0; transform: translateX(100px); }
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.lang-btn:hover, .lang-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
