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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2.5rem;
}

/* Search Area */
.search-section {
    margin-bottom: 30px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
}

.search-button {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 80px;
}

.search-button:hover:not(:disabled) {
    background-color: #2980b9;
}

.search-button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Status Information */
.loading, .error, .no-results {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.loading {
    background-color: #e8f4fd;
    color: #2980b9;
}

.error {
    background-color: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #f5c6cb;
}

.no-results {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Results Area */
.results-section {
    margin-top: 30px;
}

.results-header h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.video-list {
    display: grid;
    gap: 20px;
}

.video-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Video Information */
.video-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.video-thumbnail {
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.video-details {
    flex: 1;
}

.video-title {
    margin-bottom: 8px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.video-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-title a:hover {
    color: #3498db;
}

.uploader-name, .platform {
    margin-bottom: 4px;
    color: #666;
    font-size: 0.9rem;
}

/* Speech Search Results */
.speech-results {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.speech-results h4 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1rem;
}

.no-matches {
    color: #999;
    font-style: italic;
}

.speech-matches {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.speech-match {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.match-time {
    margin-bottom: 6px;
}

.time-link {
    background-color: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.time-link:hover {
    background-color: #2980b9;
}

.match-text {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .video-info {
        flex-direction: column;
    }
    
    .video-thumbnail img {
        width: 100%;
        height: auto;
        max-width: 300px;
    }
    
    .speech-matches {
        gap: 8px;
    }
    
    .speech-match {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .search-input, .search-button {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .video-card {
        padding: 15px;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
}
