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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container - Landing Page */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
}

/* Input Section */
.input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #667eea;
    color: white;
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
}

button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Example URL Section */
.example-url {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.example-url p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.example-url a {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    padding: 10px 20px;
    border-radius: 8px;
    background: #f0f2ff;
    transition: all 0.3s;
    line-height: 1.6;
}

.example-url a strong {
    font-size: 1.1em;
}

.example-url a span {
    font-size: 0.85em;
    opacity: 0.8;
}

.example-url a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Example Section */
.example-section {
    background: #fff;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.example-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.example-section ol {
    padding-left: 25px;
}

.example-section li {
    margin-bottom: 10px;
    color: #555;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
}

/* Dictation Page Styles */
.dictation-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dictation-container header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

#back-button {
    background: #6c757d;
    width: auto;
    padding: 10px 20px;
    font-size: 1em;
}

#back-button:hover {
    background: #5a6268;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Video Section */
.video-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

#player {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.video-controls button {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    font-size: 0.9em;
}

#play-pause-btn {
    background: #28a745;
}

#play-pause-btn:hover {
    background: #218838;
}

#replay-btn {
    background: #17a2b8;
}

#replay-btn:hover {
    background: #138496;
}

#skip-btn {
    background: #ffc107;
    color: #333;
}

#skip-btn:hover {
    background: #e0a800;
}

.progress-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.progress-info p {
    font-weight: 600;
    color: #667eea;
    margin: 5px 0;
}

/* Dictation Section */
.dictation-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

.dictation-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.current-sentence-display {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    min-height: 50px;
}

#instruction-text {
    color: #666;
    font-style: italic;
}

textarea {
    width: 100%;
    padding: 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.primary-btn {
    background: #28a745;
    flex: 1;
}

.primary-btn:hover {
    background: #218838;
}

.primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: #6c757d;
    flex: 1;
}

.secondary-btn:hover {
    background: #5a6268;
}

.secondary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Feedback Section */
.feedback {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

.feedback.hidden {
    display: none;
}

.feedback p {
    margin: 5px 0;
}

.success-text {
    color: #28a745;
    font-weight: 600;
    font-size: 1.1em;
}

.error-text {
    color: #dc3545;
    font-weight: 600;
    font-size: 1.1em;
}

.info-text {
    color: #17a2b8;
    font-weight: 600;
    font-size: 1.1em;
}

.correct-text {
    color: #666;
    font-style: italic;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container, .dictation-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .dictation-container header {
        flex-direction: column;
        gap: 15px;
    }
    
    #back-button {
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .video-controls {
        flex-direction: column;
    }
    
    .video-controls button {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback {
    animation: fadeIn 0.3s ease-in-out;
}
