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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    max-width: 600px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Welcome Section */
.welcome-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.words-input {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.words-input input {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.words-input input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.words-input input::placeholder {
    color: #999;
}

.record-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.record-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.record-btn:active {
    transform: translateY(-1px);
}

/* Loading Animation */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.loading p {
    font-size: 1.1rem;
    color: #667eea;
    margin: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 30px 20px;
    }
    
    .welcome-section h1 {
        font-size: 2.5rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
    
    .words-input input {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .record-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px 15px;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .words-input {
        gap: 10px;
    }
    
    .words-input input {
        padding: 10px 12px;
    }
}

/* Animation for page transitions */
.container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form validation styles */
.words-input input:invalid {
    border-color: #ff6b6b;
}

.words-input input:valid {
    border-color: #4ecdc4;
}

/* Focus ring for accessibility */
.words-input input:focus,
.record-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .container {
        background: white;
        border: 2px solid #000;
    }
    
    .welcome-section h1 {
        -webkit-text-fill-color: #000;
        color: #000;
    }
    
    .record-btn {
        background: #000;
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
