/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    padding: 30px 0;
}

.logo h1 {
    font-size: 2.5rem;
    color: #4285f4;
    font-weight: 500;
}

/* Search container styles */
.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-box {
    display: flex;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 24px;
    overflow: hidden;
    background: white;
    height: 48px;
}

#search-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    outline: none;
    height: 100%;
}

.quality-dropdown {
    position: relative;
    border-left: 1px solid #f0f0f0;
    height: 100%;
    display: flex;
    align-items: center;
}

#quality-select {
    appearance: none;
    background: transparent;
    border: none;
    padding: 12px 30px 12px 15px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    height: 100%;
}

.quality-dropdown::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #4285f4;
    pointer-events: none;
}

#search-button {
    background-color: #4285f4;
    border: none;
    min-width: 50px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 0 24px 24px 0;
}

#search-button:hover {
    background-color: #3367d6;
}

#search-button svg {
    fill: white;
}

/* Results container styles */
.results-container {
    margin-top: 20px;
}

.results-count {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.movies-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.movie-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.movie-info p {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.movie-details .seeds,
.movie-details .size {
    margin-right: 15px;
}

.play-button {
    width: 100%;
    padding: 10px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
    font-size: 15px;
}

.play-button:hover {
    background-color: #3367d6;
}

/* Player container styles */
.player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #222;
    color: white;
}

.player-header h2 {
    margin: 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.player-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

video {
    max-width: 100%;
    max-height: 100%;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(66, 133, 244, 0.1);
    border-top-color: #4285f4;
    animation: spin 1s infinite linear;
}

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

/* Loading message styles */
.loading-message {
    grid-column: 1 / -1;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.loading-message p {
    margin: 15px 0;
}

#torrent-stats {
    font-size: 14px;
    color: #ccc;
}

/* Error message styles */
.error-message {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    grid-column: 1 / -1;
}

/* No results styles */
.no-results {
    grid-column: 1 / -1;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    color: #666;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Footer styles */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 20px 0;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-box {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        border-radius: 12px;
        height: auto;
        overflow: visible;
    }
    
    #search-input {
        grid-column: 1 / 3;
        grid-row: 1;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        height: 48px;
        border-radius: 12px 12px 0 0;
        padding: 12px 15px;
    }
    
    .quality-dropdown {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        border-left: none;
        height: 48px;
        border-radius: 0 0 0 12px;
        background-color: #f8f9fa;
        border-right: 1px solid #f0f0f0;
    }
    
    #quality-select {
        width: 100%;
        text-align: center;
        padding: 12px 15px;
    }
    
    #search-button {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        height: 48px;
        border-radius: 0 0 12px 0;
    }
    
    .quality-dropdown::after {
        right: 15px;
    }
    
    .movies-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .movie-info {
        padding: 15px;
    }
    
    .movie-info h3 {
        font-size: 16px;
        margin-bottom: 8px;
        /* Remove any text truncation to ensure titles are fully visible */
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.4;
    }
    
    .movie-info p {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .movie-details .seeds,
    .movie-details .size {
        display: block;
        margin-bottom: 5px;
    }
    
    .play-button {
        padding: 10px;
        font-size: 14px;
        margin-top: 8px;
    }
    
    .results-count {
        font-size: 14px;
        margin-bottom: 10px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px 0;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .movie-info h3 {
        font-size: 15px;
    }
    
    .movie-info p {
        font-size: 13px;
    }
    
    .play-button {
        padding: 10px;
        font-size: 14px;
    }
    
    footer {
        margin-top: 30px;
        padding: 15px 0;
        font-size: 12px;
    }
}
