:root {
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(20, 20, 28, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8f9fa;
    --text-muted: #a0a0ab;
    --primary-color: #7c3aed;
    --primary-hover: #6d28d9;
    --secondary-color: #3b82f6;
    --accent-color: #f43f5e;
    --success-color: #10b981;
    
    --word-color: #2b579a;
    --excel-color: #217346;

    --font-primary: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background Shapes */
.bg-shape {
    position: absolute;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(10deg); }
}

/* Glassmorphism */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    color: var(--primary-color);
    width: 32px;
    height: 32px;
}

.highlight {
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Buttons */
.btn-primary, .btn-primary-outline, .btn-secondary {
    font-family: inherit;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
}

.btn-primary-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--accent-color);
    background: rgba(244, 63, 94, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 5%;
    gap: 4rem;
}

/* Hero Section */
.hero {
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.badge {
    background: rgba(124, 58, 237, 0.1);
    color: #c4b5fd;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.6;
}

/* Upload Section */
.upload-section {
    width: 100%;
    max-width: 700px;
    position: relative;
}

.upload-container {
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-container:hover, .upload-container.dragover {
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.05);
}

.hidden-input {
    display: none;
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.upload-container:hover .upload-icon-wrapper {
    transform: translateY(-5px);
}

.upload-icon {
    width: 40px;
    height: 40px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.browse-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.file-info {
    font-size: 0.85rem;
    color: rgba(160, 160, 171, 0.7);
}

/* Conversion Settings */
.conversion-settings {
    padding: 2rem;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.file-icon {
    color: var(--primary-color);
}

.file-name {
    flex: 1;
    font-family: var(--font-en);
    direction: ltr;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.options-group label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.format-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.format-option input {
    display: none;
}

.option-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-en);
    font-weight: 600;
}

.format-option input:checked + .option-card {
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.1);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.word-icon { color: var(--word-color); }
.excel-icon { color: var(--excel-color); }

/* Progress Section */
.conversion-progress {
    padding: 3rem 2rem;
    text-align: center;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.scanning-animation {
    width: 100px;
    height: 120px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: rgba(124, 58, 237, 0.05);
}

.scanner-line {
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    box-shadow: 0 0 10px 2px var(--secondary-color);
    position: absolute;
    top: 0;
    animation: scan 2s infinite linear alternate;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Result Section */
.conversion-result {
    padding: 3rem 2rem;
    text-align: center;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--success-color);
}

.success-icon {
    width: 40px;
    height: 40px;
}

.conversion-result h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.conversion-result p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
}

.feature-card {
    padding: 2rem;
    text-align: right;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.bg-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.bg-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-orange { background: linear-gradient(135deg, #f97316, #ea580c); }

.feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    padding: 3rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav { display: none; }
    .format-options { grid-template-columns: 1fr; }
    .result-actions { flex-direction: column; }
}
