@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;600;700&display=swap');

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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

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

/* تصميم صفحة تسجيل الدخول */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-title {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    color: #2d3436;
    margin-bottom: 30px;
    font-weight: 700;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: #fd79a8;
    box-shadow: 0 0 10px rgba(253, 121, 168, 0.3);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 121, 168, 0.4);
}

.error-message {
    background: #ff7675;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* تصميم الصفحة الرئيسية */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-family: 'Amiri', serif;
    font-size: 3rem;
    color: #2d3436;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #636e72;
    margin-bottom: 20px;
}

.user-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 25px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logout-btn {
    background: #e17055;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #d63031;
    transform: translateY(-1px);
}

/* تصميم الشجرة */
.tree-container {
    position: relative;
    text-align: center;
    margin: 40px 0;
}

.tree-image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.messages-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.message-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 200px;
    font-size: 14px;
    line-height: 1.4;
    border: 2px solid #fd79a8;
    pointer-events: auto;
    transition: all 0.3s ease;
    cursor: pointer;
}

.message-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.message-author {
    font-weight: 600;
    color: #fd79a8;
    margin-bottom: 5px;
}

.message-date {
    font-size: 12px;
    color: #636e72;
    margin-top: 5px;
}

/* تصميم نموذج إضافة الرسالة */
.message-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.message-form h3 {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 20px;
    text-align: center;
}

.message-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 15px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    resize: vertical;
    transition: all 0.3s ease;
}

.message-textarea:focus {
    outline: none;
    border-color: #fd79a8;
    box-shadow: 0 0 15px rgba(253, 121, 168, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4);
}

.submit-btn:disabled {
    background: #b2bec3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.info-message {
    background: #74b9ff;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: #00b894;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .message-form {
        margin: 20px;
        padding: 20px;
    }
    
    .message-card {
        max-width: 150px;
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* تأثيرات حركية */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

