/* style.css - rivo.lat */
/* تصميم عصري أنيق مع خصوصية كاملة */

:root {
    --navy: #0A1625;
    --snow: #F8FAFC;
    --accent: #4A90E2;
    --accent-dark: #3a7bc8;
    --border: #1e2a3f;
    --text-muted: #8a9eb8;
    --card-bg: #13253a;
    --danger: #e74c3c;
    --success: #2ecc71;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background-color: var(--navy);
    color: var(--snow);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== الهيدر ========== */
header {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--navy) 0%, #0d1b2a 100%);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--snow) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

/* ========== المحتوى الرئيسي ========== */
main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.editor-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.editor-container:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

/* ========== منطقة الكتابة ========== */
#note-text {
    width: 100%;
    min-height: 450px;
    background: rgba(10, 22, 37, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--snow);
    font-size: 1.15rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    padding: 1rem;
    transition: all 0.3s;
    line-height: 1.7;
}

#note-text:focus {
    border-color: var(--accent);
    background: rgba(10, 22, 37, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#note-text::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ========== معرض الصور ========== */
.image-preview {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    min-height: 60px;
}

.image-preview div {
    position: relative;
    display: inline-block;
    transition: transform 0.2s;
}

.image-preview div:hover {
    transform: scale(1.02);
}

.image-preview img {
    max-height: 150px;
    max-width: 150px;
    border-radius: 10px;
    border: 2px solid var(--border);
    object-fit: cover;
    transition: all 0.2s;
}

.image-preview img:hover {
    border-color: var(--accent);
}

/* ========== شريط الأدوات ========== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

button {
    padding: 10px 18px;
    background-color: var(--border);
    color: var(--snow);
    border: 1px solid var(--accent);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

button:hover {
    background-color: var(--accent);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

button:active {
    transform: translateY(0);
}

/* ========== الفوتر ========== */
footer {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(0deg, var(--navy) 0%, #0d1b2a 100%);
}

.estonian-quote {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.translation {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    opacity: 0.8;
}

/* ========== الأزرار الثقافية ========== */
.cultural-links {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.culture-btn {
    display: inline-block;
    margin: 4px;
    padding: 6px 14px;
    background: var(--border);
    color: var(--snow);
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.culture-btn:hover {
    background: var(--accent);
    color: var(--navy);
    transform: translateY(-2px);
    border-color: var(--snow);
}

/* ========== عناصر مساعدة ========== */
.small-text, .live-clock, .bottom-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.live-clock {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.3);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 0.5rem 0;
}

.features small {
    display: block;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ========== رسائل التنبيه المخصصة (اختياري) ========== */
.alert-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: var(--navy);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

/* ========== التجاوب مع الجوال ========== */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    #note-text {
        min-height: 300px;
        font-size: 1rem;
    }
    
    .toolbar button {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .editor-container {
        padding: 1rem;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }
    
    .culture-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

/* ========== التجاوب مع الشاشات الصغيرة جداً ========== */
@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .toolbar {
        gap: 8px;
    }
    
    .toolbar button {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .image-preview img {
        max-height: 100px;
        max-width: 100px;
    }
}

/* ========== وضع التباين العالي (احترام إعدادات المستخدم) ========== */
@media (prefers-contrast: high) {
    :root {
        --accent: #00aaff;
        --border: #ffffff;
    }
    
    button, .culture-btn {
        border: 2px solid white;
    }
}

/* ========== شريط تمرير مخصص ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}
