@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --accent-primary: #7dd3fc;
    --accent-secondary: #c4b5fd;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --glass: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.5);
    --success: #10b981;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%237dd3fc' fill-opacity='0.08' d='M22.777 401.568l-8.014-56.122.776-.781c7.63-7.674 25.377-27.488 25.377-45.704 0-10.337-5.59-19.335-11.507-28.862-7.391-11.879-15.033-24.158-15.033-41.911 0-20.741 10.471-45.665 27.326-65.048 19.65-22.589 45.487-35.029 72.752-35.029 32.76 0 71.394 8.112 105.478 15.27l.285.06c28.569 6.016 53.241 11.211 71.17 11.211 2.184 0 8.83 0 36.793-17.887 10.474-6.697 21.229-14.261 29.507-20.755l2.192-1.72 1.177 2.525c2.497 5.353 5.023 8.784 5.048 8.818 1.159 1.578 2.949 2.478 4.913 2.478 1.298 0 2.54-.407 3.594-1.177 2.698-1.988 3.282-5.805 1.294-8.503-.77-1.1-7.124-10.481-7.638-20.865l-.127-2.56 2.551.25c5.753.563 17.794 6.347 21.772 12.412 1.13 1.727 3.035 2.757 5.098 2.757 1.179 0 2.327-.344 3.318-.994.78-.516 1.412-1.178 1.874-1.961l.595-1.009 1.168-.075c2.297-.149 4.653-.224 7.004-.224 38.889 0 74.348 20.489 84.29 26.769 1.152.728 1.816 1.937 1.816 3.319v30.012c0 7.37-20.012 15.305-63.95 15.305-24.674 0-32.362-4.466-41.275-11.281-1.072-.821-2.347-1.254-3.69-1.254-1.914 0-3.68.871-4.844 2.39-.983 1.288-1.409 2.887-1.195 4.499.213 1.609 1.041 3.038 2.329 4.021 5.235 4.001 11.15 8.125 20.75 10.75l2.748.751-1.409 2.476c-37.85 66.52-78.946 84.167-86.801 87.029-10.515 3.811-17.969 13.205-19.454 24.517-3.049 23.124-6.683 54.577-6.683 73.118 0 10.02 2.056 18.771 6.11 26.012l1.843 3.292h-3.917c-6.527 0-12.201-4.391-13.8-10.679-4.501-17.658-12.235-50.5-13.467-72.043-.041-.652-.187-1.3-.432-1.915l-17.693-44.233c-.924-2.328-3.139-3.828-5.645-3.828-.774 0-1.535.147-2.261.438-3.107 1.246-4.625 4.794-3.379 7.907l9.593 24.001-2.217.745c-10.288 3.458-24.813 5.139-44.404 5.139-16.204 0-33.503-1.163-47.405-2.099-9.63-.65-18.726-1.265-26.373-1.466l-4.28-.113 2.572-3.424c3.28-4.374 6.151-8.864 8.529-13.345.76-1.433.916-3.079.437-4.631-.479-1.554-1.533-2.829-2.969-3.591-.89-.472-1.847-.711-2.845-.711-2.26 0-4.32 1.239-5.378 3.231-17.401 32.84-56.606 52.582-75.449 62.07-10.703 5.391-13.243 6.816-13.691 10.896-2.092 19.038-1.672 35.012 1.248 47.479l1.277 5.453z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c4b5fd' fill-opacity='0.05' d='M495.413 136.249v30.012c0 4.28-15.095 13.093-61.739 13.093-23.985 0-31.384-4.291-39.932-10.826-3.638-2.787-8.847-2.09-11.633 1.548-2.776 3.638-2.09 8.847 1.548 11.622 5.861 4.479 11.921 8.504 21.508 11.125-37.432 65.786-77.685 83.147-85.636 86.045-11.291 4.092-19.297 14.177-20.889 26.308-3.063 23.234-6.701 54.827-6.701 73.405 0 11.821 2.776 20.635 6.392 27.093h-.144c-5.518 0-10.306-3.705-11.655-9.013-4.49-17.616-12.186-50.36-13.403-71.625-.055-.896-.254-1.78-.586-2.61l-17.693-44.233c-1.692-4.257-6.524-6.325-10.782-4.622-4.246 1.703-6.314 6.524-4.611 10.782l8.725 21.829c-22.371 7.52-61.694 4.899-90.955 2.93-9.986-.675-18.921-1.272-26.463-1.471 3.218-4.291 6.159-8.825 8.714-13.635 2.145-4.047.597-9.068-3.45-11.213s-9.068-.608-11.213 3.439c-17.063 32.202-55.844 51.742-74.489 61.13-10.693 5.385-14.298 7.199-14.896 12.629-2.444 22.238-1.183 37.654 1.294 48.225l-11.899-7.94-7.719-54.053c7.796-7.84 26.02-28.177 26.02-47.263 0-10.97-5.75-20.226-11.843-30.034-7.232-11.622-14.697-23.643-14.697-40.739 0-20.226 10.262-44.598 26.783-63.596 19.219-22.094 44.465-34.27 71.083-34.27 32.622 0 71.238 8.128 105.308 15.283 28.73 6.049 53.544 11.257 71.625 11.257 2.588 0 9.477 0 37.985-18.235 10.793-6.9 21.575-14.52 29.681-20.878 2.521 5.408 5.054 8.902 5.275 9.201 1.626 2.212 4.136 3.373 6.69 3.373 1.703 0 3.417-.52 4.899-1.603 3.693-2.72 4.49-7.907 1.769-11.6-.066-.1-6.701-9.389-7.21-19.662 5.197.509 16.576 5.994 20.137 11.423 2.51 3.837 7.652 4.91 11.479 2.4 1.084-.719 1.946-1.637 2.566-2.687 40.684-2.632 78.802 19.153 89.97 26.208.509.321.785.841.785 1.449z'/%3E%3C/svg%3E"),
        radial-gradient(circle at 20% 30%, rgba(125, 211, 252, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(196, 181, 253, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(125, 211, 252, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(196, 181, 253, 0.02) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-size: 
        clamp(300px, 40vw, 600px) clamp(200px, 30vw, 400px),
        clamp(350px, 45vw, 650px) clamp(220px, 32vw, 420px),
        300px 300px,
        400px 400px,
        250px 250px,
        350px 350px,
        cover;
    background-position: 
        calc(100% - 30px) calc(100% - 30px),
        calc(100% - 50px) calc(100% - 50px),
        20% 30%,
        80% 70%,
        40% 80%,
        90% 20%,
        center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Эффект для hover на капибаре */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at calc(100% - 50px) calc(100% - 50px), 
            rgba(125, 211, 252, 0.1) 0%, 
            transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

body:hover::before {
    opacity: 1;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 60px 24px; 
}

.header {
    text-align: center;
    margin-bottom: 60px;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    word-break: break-word;
}

.progress-container {
    width: min(90%, 600px);
    height: 12px;
    background: var(--glass);
    margin: 0 auto 20px;
    border-radius: 9999px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(125, 211, 252, 0.3);
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
}

.mode-info {
    background: var(--glass);
    backdrop-filter: blur(24px);
    padding: 32px 40px;
    border-radius: 24px;
    margin: 48px 0;
    text-align: center;
    border: 1px solid rgba(125, 211, 252, 0.2);
    box-shadow: 0 25px 50px -12px var(--shadow);
    position: relative;
    overflow: hidden;
}

.mode-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.search-section { 
    margin-bottom: 64px;
    position: relative;
    z-index: 2;
}

.search-box {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 20px 32px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 1.1rem;
    background: rgba(26, 26, 46, 0.8);
    color: var(--text-primary);
    font-family: inherit;
    backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.search-input::placeholder { 
    color: var(--text-secondary);
    opacity: 0.8;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.1), 0 20px 40px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.search-btn {
    padding: 20px 36px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(125, 211, 252, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(125, 211, 252, 0.4);
}

.search-btn:active { transform: translateY(-2px); }

.movie-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 64px;
}

.movie-item {
    background: var(--glass);
    backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-item-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.movie-checkbox {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    accent-color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.movie-checkbox:hover {
    transform: scale(1.15);
}

.movie-checkbox:checked {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(125, 211, 252, 0.4);
}

.movie-checkbox:checked::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: rgba(125, 211, 252, 0.1);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.movie-info {
    flex: 1;
    min-width: 0;
}

.movie-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

.movie-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.movie-title a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.movie-title a:hover::after { width: 100%; }

.movie-title a:hover { color: var(--accent-primary); }

.movie-year {
    background: var(--accent-secondary);
    color: #1e293b;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.remove-btn {
    background: #ef4444;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.online-indicator {
    position: fixed;
    top: 32px;
    right: 32px;
    width: 16px;
    height: 16px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--success);
    animation: pulse 2s infinite;
    z-index: 1000;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    box-shadow: 0 25px 50px -12px var(--shadow);
    text-align: center;
}

.stat-item {
    font-size: 1.25rem;
    font-weight: 600;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

/* Анимация для капибары */
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5px, -5px); }
}

body::after {
    content: '';
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: clamp(300px, 40vw, 600px);
    height: clamp(200px, 30vw, 400px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%237dd3fc' fill-opacity='0.1' d='M22.777 401.568l-8.014-56.122.776-.781c7.63-7.674 25.377-27.488 25.377-45.704 0-10.337-5.59-19.335-11.507-28.862-7.391-11.879-15.033-24.158-15.033-41.911 0-20.741 10.471-45.665 27.326-65.048 19.65-22.589 45.487-35.029 72.752-35.029 32.76 0 71.394 8.112 105.478 15.27l.285.06c28.569 6.016 53.241 11.211 71.17 11.211 2.184 0 8.83 0 36.793-17.887 10.474-6.697 21.229-14.261 29.507-20.755l2.192-1.72 1.177 2.525c2.497 5.353 5.023 8.784 5.048 8.818 1.159 1.578 2.949 2.478 4.913 2.478 1.298 0 2.54-.407 3.594-1.177 2.698-1.988 3.282-5.805 1.294-8.503-.77-1.1-7.124-10.481-7.638-20.865l-.127-2.56 2.551.25c5.753.563 17.794 6.347 21.772 12.412 1.13 1.727 3.035 2.757 5.098 2.757 1.179 0 2.327-.344 3.318-.994.78-.516 1.412-1.178 1.874-1.961l.595-1.009 1.168-.075c2.297-.149 4.653-.224 7.004-.224 38.889 0 74.348 20.489 84.29 26.769 1.152.728 1.816 1.937 1.816 3.319v30.012c0 7.37-20.012 15.305-63.95 15.305-24.674 0-32.362-4.466-41.275-11.281-1.072-.821-2.347-1.254-3.69-1.254-1.914 0-3.68.871-4.844 2.39-.983 1.288-1.409 2.887-1.195 4.499.213 1.609 1.041 3.038 2.329 4.021 5.235 4.001 11.15 8.125 20.75 10.75l2.748.751-1.409 2.476c-37.85 66.52-78.946 84.167-86.801 87.029-10.515 3.811-17.969 13.205-19.454 24.517-3.049 23.124-6.683 54.577-6.683 73.118 0 10.02 2.056 18.771 6.11 26.012l1.843 3.292h-3.917c-6.527 0-12.201-4.391-13.8-10.679-4.501-17.658-12.235-50.5-13.467-72.043-.041-.652-.187-1.3-.432-1.915l-17.693-44.233c-.924-2.328-3.139-3.828-5.645-3.828-.774 0-1.535.147-2.261.438-3.107 1.246-4.625 4.794-3.379 7.907l9.593 24.001-2.217.745c-10.288 3.458-24.813 5.139-44.404 5.139-16.204 0-33.503-1.163-47.405-2.099-9.63-.65-18.726-1.265-26.373-1.466l-4.28-.113 2.572-3.424c3.28-4.374 6.151-8.864 8.529-13.345.76-1.433.916-3.079.437-4.631-.479-1.554-1.533-2.829-2.969-3.591-.89-.472-1.847-.711-2.845-.711-2.26 0-4.32 1.239-5.378 3.231-17.401 32.84-56.606 52.582-75.449 62.07-10.703 5.391-13.243 6.816-13.691 10.896-2.092 19.038-1.672 35.012 1.248 47.479l1.277 5.453z'/%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    pointer-events: none;
    z-index: 1;
    animation: float 15s ease-in-out infinite;
}

/* Плавные анимации для элементов */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-item {
    animation: fadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ========== МОБИЛЬНЫЙ АДАПТИВ ========== */
@media (max-width: 1024px) {
    .container {
        padding: 50px 20px;
    }
    
    .header h1 {
        font-size: clamp(2.2rem, 5vw, 3.5rem);
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        padding: 30px;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-item {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .container { 
        padding: 30px 16px; 
    }
    
    .header {
        margin-bottom: 40px;
    }
    
    .header h1 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
        margin-bottom: 20px;
    }
    
    .progress-container {
        width: 100%;
        height: 10px;
    }
    
    .progress-text {
        font-size: 1rem;
    }
    
    .mode-info {
        padding: 24px 20px;
        margin: 32px 0;
        font-size: 0.95rem;
    }
    
    .search-box { 
        flex-direction: column; 
        gap: 12px;
    }
    
    .search-input {
        padding: 16px 20px;
        font-size: 1rem;
        width: 100%;
    }
    
    .search-btn {
        padding: 16px 24px;
        font-size: 1rem;
        width: 100%;
        white-space: normal;
    }
    
    .movie-item {
        padding: 20px;
    }
    
    .movie-item-content { 
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }
    
    .movie-checkbox {
        width: 24px;
        height: 24px;
    }
    
    .movie-info {
        flex: 1;
        min-width: calc(100% - 80px);
    }
    
    .movie-title {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .movie-year {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
    
    .remove-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-left: auto;
    }
    
    .online-indicator {
        top: 20px;
        right: 20px;
        width: 14px;
        height: 14px;
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
        padding: 20px 16px;
        gap: 12px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-item {
        font-size: 0.9rem;
    }
    
    body {
        background-size: 
            clamp(150px, 40vw, 250px) clamp(100px, 25vw, 160px),
            clamp(170px, 45vw, 280px) clamp(110px, 27vw, 180px),
            150px 150px,
            200px 200px,
            120px 120px,
            180px 180px,
            cover;
        background-position: 
            calc(100% - 15px) calc(100% - 15px),
            calc(100% - 30px) calc(100% - 30px),
            10% 20%,
            70% 60%,
            30% 70%,
            80% 15%,
            center center;
    }
    
    body::after {
        width: clamp(150px, 40vw, 250px);
        height: clamp(100px, 25vw, 160px);
        bottom: 15px;
        right: 15px;
        animation: float 12s ease-in-out infinite;
    }
    
    /* Уведомления на мобильных */
    .update-notification div {
        top: 70px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
        text-align: center;
        font-size: 0.95rem;
        padding: 12px 20px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .movie-item-content {
        gap: 10px;
    }
    
    .movie-info {
        min-width: calc(100% - 70px);
    }
    
    .movie-title {
        font-size: 1.1rem;
    }
    
    .movie-year {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    
    .remove-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .stats {
        padding: 16px 12px;
        gap: 8px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-item {
        font-size: 0.8rem;
    }
    
    .search-input {
        padding: 14px 16px;
    }
    
    .search-btn {
        padding: 14px 20px;
    }
    
    .online-indicator {
        top: 16px;
        right: 16px;
        width: 12px;
        height: 12px;
    }
    
    /* Результаты поиска на мобильных */
    #searchResults > div {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    #searchResults > div > div {
        padding: 24px !important;
    }
    
    #searchResults > div > div > div:first-child {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 360px) {
    .header h1 {
        font-size: 1.4rem;
    }
    
    .movie-title {
        font-size: 1rem;
    }
    
    .movie-year {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
        display: inline-block;
        margin-left: 10px;
    }
}

/* Для устройств с touch-экраном убираем hover эффекты */
@media (hover: none) and (pointer: coarse) {
    .search-btn:hover {
        transform: none;
        box-shadow: 0 10px 25px rgba(125, 211, 252, 0.3);
    }
    
    .movie-title a:hover::after {
        width: 0;
    }
    
    .movie-title a:hover {
        color: inherit;
    }
    
    .remove-btn:hover {
        transform: none;
        background: #ef4444;
    }
    
    .movie-checkbox:hover {
        transform: none;
    }
}

/* Для устройств с маленькой высотой экрана */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        padding: 20px 16px;
    }
    
    .header {
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    
    .search-section {
        margin-bottom: 30px;
    }
    
    .movie-list {
        gap: 16px;
        margin-bottom: 30px;
    }
    
    .stats {
        padding: 16px;
    }
}