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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.chrome-notice {
    text-align: center;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 13px;
    max-width: 600px;
    margin: 0 auto 10px auto;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chrome-notice span {
    font-size: 16px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.logo-header {
    text-align: center;
    padding: 25px 20px 20px 20px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.logo-image {
    max-width: 180px;
    height: auto;
    margin-bottom: 10px;
    display: block;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.logo-slogan {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin: 0;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

main {
    padding: 30px 20px;
}

.form-container {
    animation: fadeIn 0.5s ease-in;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
    direction: rtl;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

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

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

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

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

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

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.progress-container {
    text-align: center;
    padding: 30px 20px;
    animation: fadeIn 0.5s ease-in;
}

.progress-container h2 {
    margin-bottom: 20px;
    color: #333;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
    border-radius: 15px;
    animation: pulse 2s ease-in-out infinite;
}

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

.progress-text {
    color: #666;
    font-size: 14px;
}

.timer-text {
    color: #667eea;
    font-weight: 600;
    margin-top: 10px;
    font-size: 18px;
}

.video-result {
    text-align: center;
    padding: 30px 20px;
    animation: fadeIn 0.5s ease-in;
}

.video-result h2 {
    margin-bottom: 20px;
    color: #333;
}

#videoContainer {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#videoContainer video {
    width: 100%;
    display: block;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #fcc;
    margin-top: 20px;
    text-align: center;
}

footer {
    background: #f5f5f5;
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

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

/* Model Tabs */
.model-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 10px 10px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.tab-button:hover {
    background: #eeeeee;
    color: #333;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Ensure tab links work properly */
a.tab-button {
    text-decoration: none;
    display: block;
}

a.tab-button:hover {
    text-decoration: none;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 24px;
    }

    main {
        padding: 20px 15px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .tab-button {
        padding: 12px 15px;
        font-size: 14px;
    }
}

