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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
}

.section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-content .upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-content p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.browse-text {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
}

.file-limit {
    font-size: 0.9rem;
    color: #666;
}

/* Progress Bar */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #667eea;
}

/* Result Containers */
.result-container, .error-container {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
}

.result-container {
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
}

.error-container {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.success-message h3, .file-details h3 {
    margin-bottom: 15px;
    color: #059669;
}

.error-message h3 {
    margin-bottom: 15px;
    color: #dc2626;
}

/* Code Display */
.code-display {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    border: 2px solid #e5e7eb;
}

.code-display label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
}

.code-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
}

/* Code Input */
.code-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#code-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
}

#code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.primary-btn, .secondary-btn, .copy-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.secondary-btn:hover {
    background: #e5e7eb;
}

.copy-btn {
    background: #10b981;
    color: white;
    font-size: 0.9rem;
    padding: 8px 16px;
}

.copy-btn:hover {
    background: #059669;
}

.download-btn {
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* File Info */
.file-info {
    background: rgba(255,255,255,0.7);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.file-info p {
    margin-bottom: 8px;
}

.file-info strong {
    color: #374151;
}

/* Timer */
.timer {
    font-weight: bold;
    color: #dc2626;
    font-family: 'Courier New', monospace;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.error {
    background: #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes coffeeFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.coffee-footer:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.coffee-footer p:first-child {
    animation: coffeeFloat 3s ease-in-out infinite;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.coffee-footer {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.coffee-footer p {
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.coffee-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    font-style: italic;
    color: #f0f0f0 !important;
}

.coffee-tagline {
    font-size: 0.95rem;
    margin-top: 8px;
    opacity: 0.9;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .code-input-container {
        flex-direction: column;
    }
    
    .code-value {
        font-size: 1.5rem;
    }
    
    .upload-content .upload-icon {
        font-size: 2rem;
    }
}
