@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Poppins:wght@300;400;600;700&family=Montserrat:wght@400;500;600&display=swap');

:root {
    --primary-color: #FDD835; 
    --secondary-color: #BF360C; 
    --dark-color: #212121;
    --light-color: #FFFDE7; 
    --grey-color: #e9ecef;
    --cheek-color: #FF5252; 
    --ear-brown: #5D4037; 
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover: #FFF9C4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-color);
    background-image: 
        linear-gradient(rgba(253, 216, 53, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(253, 216, 53, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--dark-color);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo h1 {
    margin-left: 20px;
    color: var(--dark-color);
    font-weight: 700;
    font-size: 36px;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: -1px;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.pikachu-logo {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
}

/* Play Button on top of Pikachu */
.play-button {
    display: none; 
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 14px solid var(--secondary-color);
    z-index: 3;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
    animation: floatPlay 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes floatPlay {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

.play-button:hover {
    transform: translateX(-50%) scale(1.1);
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.4));
}

.ears {
    position: absolute;
    width: 100%;
    top: -15px;
    left: 0;
    z-index: 1;
}

.ear {
    position: absolute;
    width: 14px;
    height: 28px;
    background-color: var(--primary-color);
    border-radius: 50% 50% 0 0;
    border: 2px solid var(--dark-color);
    box-shadow: 1px 2px 0 rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.ear.left {
    left: 13px;
    transform: rotate(-15deg);
    transform-origin: bottom center;
    animation: earTwitchLeft 4s ease-in-out infinite;
}

.ear.right {
    right: 13px;
    transform: rotate(15deg);
    transform-origin: bottom center;
    animation: earTwitchRight 5s ease-in-out infinite;
}

.ear:after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--ear-brown);
    border-radius: 50%;
    top: 3px;
    left: 3px;
}

@keyframes earTwitchLeft {
    0%, 85%, 100% { transform: rotate(-15deg); }
    90% { transform: rotate(-25deg) translateY(-2px); }
}

@keyframes earTwitchRight {
    0%, 75%, 100% { transform: rotate(15deg); }
    80% { transform: rotate(25deg) translateY(-2px); }
}

.face {
    position: absolute;
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    border-radius: 8px;
    top: 8px;
    left: 6px;
    border: 2px solid var(--dark-color);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
    z-index: 2;
    overflow: hidden;
    animation: breathe 2.5s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.face::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3) 0%, transparent 40%);
    pointer-events: none;
}

.eyes {
    position: absolute;
    top: 12px;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.eye {
    width: 6px;
    height: 9px;
    background-color: var(--dark-color);
    border-radius: 50%;
    transition: height 0.15s ease;
    animation: blinkEyes 3s infinite;
}

.eye.left {
    margin-left: 8px;
}

.eye.right {
    margin-right: 8px;
}

@keyframes blinkEyes {
    0%, 96%, 100% { height: 9px; }
    97%, 99% { height: 1px; }
}

.nose {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid var(--dark-color);
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    transition: transform 0.2s ease;
    animation: noseWiggle 4s ease-in-out infinite;
}

@keyframes noseWiggle {
    0%, 90%, 100% { transform: translateX(-50%) scale(1); }
    95% { transform: translateX(-50%) scale(1.1); }
}

.cheeks {
    position: absolute;
    top: 28px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.cheek {
    width: 10px;
    height: 10px;
    background-color: var(--cheek-color);
    border-radius: 50%;
    opacity: 0.85;
    transition: all 0.2s ease;
    animation: pulseCheeks 3s infinite alternate;
}

@keyframes pulseCheeks {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.1); }
}

.cheek.left {
    left: 3px;
}

.cheek.right {
    right: 3px;
}

.cheek.glow {
    animation: glowCheeks 1s ease-in-out;
    background-color: #FF7070;
    box-shadow: 0 0 8px #FF5252;
}

@keyframes glowCheeks {
    0% { transform: scale(1); box-shadow: 0 0 0px #FF5252; }
    50% { transform: scale(1.3); box-shadow: 0 0 12px #FF5252; }
    100% { transform: scale(1); box-shadow: 0 0 0px #FF5252; }
}

.mouth {
    position: absolute;
    width: 10px;
    height: 4px;
    border-bottom: 2px solid #000;
    border-radius: 50%;
    bottom: 13px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    animation: mouthMove 8s ease-in-out infinite;
    border-top: none;
    display: none;
}

@keyframes mouthMove {
    0%, 100% { width: 10px; height: 4px; }
    30%, 35% { width: 15px; height: 7px; }
    75%, 80% { width: 12px; height: 5px; }
}

.tail {
    position: absolute;
    width: 14px;
    height: 20px;
    background-color: var(--primary-color);
    border: 2px solid var(--dark-color);
    border-radius: 2px 12px 12px 2px;
    bottom: 3px;
    right: -12px;
    transform-origin: 0 50%;
    transform: rotate(15deg);
    z-index: 0;
    transition: transform 0.3s ease;
}

.tail-wag {
    animation: tailWag 1s infinite alternate;
}

@keyframes tailWag {
    0% { transform: rotate(15deg); }
    100% { transform: rotate(-15deg); }
}

.lightning {
    display: none;
}

@keyframes randomLightning {
    0%, 100% { opacity: 0; }
}

.tagline {
    color: var(--dark-color);
    font-weight: 300;
    letter-spacing: 0.5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    opacity: 0.8;
    margin-top: 15px;
}

.search-container {
    margin-bottom: 35px;
}

.search-box {
    display: flex;
    box-shadow: var(--shadow);
    border-radius: 10px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.search-box:focus-within {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
}

.search-box button {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    padding: 0 28px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.search-box button:hover {
    background-color: #F9A825; 
}

.results-container {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 25px;
    min-height: 300px;
    border: 2px solid var(--primary-color);
    position: relative;
}

#results-title {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--dark-color);
    font-weight: 600;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
}

.movie-item {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-color);
    background-color: var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.movie-info {
    flex: 1;
}

.movie-play {
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-left: 10px;
}

.movie-play:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
}

.movie-streams {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
    border: 2px solid var(--primary-color);
    overflow: hidden;
}

.streams-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.streams-header h3 {
    margin: 0;
    font-size: 16px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
}

.close-streams {
    cursor: pointer;
    font-size: 16px;
}

.streams-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.stream-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.stream-link:hover {
    background-color: var(--card-hover);
}

.stream-title {
    font-weight: 500;
    color: var(--dark-color);
}

.stream-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stream-actions button {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stream-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.stream-actions button.copy-link {
    background-color: #f8f9fa;
    color: var(--dark-color);
    border: 1px solid #dee2e6;
}

.stream-actions button.copy-link:hover {
    background-color: #e9ecef;
}

.stream-actions button.play-mx {
    background-color: #2196F3;
    color: white;
}

.stream-actions button.play-mx:hover {
    background-color: #1976D2;
}

.stream-actions button.play-vlc {
    background-color: #FF9800;
    color: white;
}

.stream-actions button.play-vlc:hover {
    background-color: #F57C00;
}

.stream-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary-color);
}

.stream-item:hover {
    background-color: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stream-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 15px;
    margin-bottom: 4px;
}

.stream-actions {
    display: flex;
    gap: 10px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
    text-align: center;
}

.error-message i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.movie-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    letter-spacing: 0.2px;
}

.movie-year {
    color: #6c757d;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6c757d;
}

.no-results i {
    font-size: 52px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.no-results p {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    text-align: center;
    line-height: 1.8;
}

#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid var(--grey-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 35px;
    padding: 20px 0;
    color: #6c757d;
    font-size: 12px;
    font-family: 'Press Start 2P', cursive;
}

.disclaimer {
    margin-top: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #868e96;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Modal for stream results */
.stream-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.stream-modal-content {
    background-color: var(--light-color);
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stream-modal-header {
    background-color: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stream-modal-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--dark-color);
    margin: 0;
}

.close-modal {
    color: var(--dark-color);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal:hover {
    transform: scale(1.1);
}

.stream-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.stream-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary-color);
}

.stream-item:hover {
    background-color: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stream-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 15px;
    margin-bottom: 4px;
}

.stream-actions {
    display: flex;
    gap: 10px;
}

.no-streams-message {
    text-align: center;
    padding: 40px 0;
    color: #6c757d;
}

.no-streams-message i {
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .search-box input {
        padding: 12px 15px;
    }
    
    .search-box button {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .pikachu-logo {
        width: 50px;
        height: 50px;
    }
    
    .face {
        width: 40px;
        height: 40px;
    }
    
    .ear {
        width: 12px;
        height: 24px;
    }
    
    .ear.left {
        left: 11px;
    }
    
    .ear.right {
        right: 11px;
    }
    
    .ears {
        top: -13px;
    }
    
    .tagline {
        font-size: 8px;
    }
    
    #results-title {
        font-size: 14px;
    }
    
    .disclaimer {
        font-size: 10px;
    }
}