/* Georgian Voiceover App - Styles */

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

:root {
    --primary-color: #4a90e2;
    --success-color: #5cb85c;
    --error-color: #d9534f;
    --background: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-radius: 12px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Input Section */
.input-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #4a9a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    margin-top: 10px;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Status Section */
.status-section,
.result-section,
.error-section {
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

.status-card,
.result-card,
.error-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.status-header h3 {
    margin: 0;
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e6ed;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e6ed;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #357abd);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.status-message {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.status-percent {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Result Section */
.success-icon,
.error-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    font-weight: bold;
}

.success-icon {
    background: #d4edda;
    color: var(--success-color);
}

.error-icon {
    background: #f8d7da;
    color: var(--error-color);
}

.video-title {
    color: var(--text-secondary);
    margin: 15px 0 25px;
    font-size: 1.1rem;
}

.error-message {
    color: var(--error-color);
    margin: 15px 0 25px;
}

/* Footer Info */
.info-box {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 40px;
}

.info-box h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.info-box ol {
    text-align: left;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Video Preview */
.video-preview {
    margin-top: 30px;
    animation: fadeIn 0.3s ease-in;
}

.video-preview h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.video-embed-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: var(--input-bg);
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* User Bar */
.user-bar {
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
    padding: 10px 20px;
}

.user-bar-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-email {
    font-weight: 500;
    color: var(--text-primary);
}

.user-tier {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tier-free { background: #e2e8f0; color: #4a5568; }
.tier-basic { background: #c6f6d5; color: #276749; }
.tier-pro { background: #bee3f8; color: #2b6cb0; }
.tier-unlimited { background: #faf089; color: #975a16; }

.user-usage {
    color: var(--text-secondary);
    font-size: 13px;
}

.guest-text {
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login,
.btn-register,
.btn-admin,
.btn-logout-sm {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-login {
    background: var(--primary-color);
    color: white;
}

.btn-login:hover {
    background: #357abd;
}

.btn-register {
    background: #e0e6ed;
    color: var(--text-primary);
}

.btn-register:hover {
    background: #d0d6dd;
}

.btn-admin {
    background: #faf089;
    color: #975a16;
}

.btn-admin:hover {
    background: #f6e05e;
}

.btn-logout-sm {
    background: #fee2e2;
    color: #c53030;
}

.btn-logout-sm:hover {
    background: #fecaca;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .container {
        padding: 20px 15px;
    }

    .input-section,
    .status-card,
    .result-card,
    .error-card,
    .info-box {
        padding: 20px;
    }

    .user-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .user-info {
        justify-content: center;
    }
}
