:root {
    --primary-color: #d19a9a;
    --primary-dark: #b87a7a;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-primary: #333;
    --text-secondary: #666;
    --error-color: #ff4d4f;
    --radius: 16px;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Utilities */
.hidden { display: none !important; }
.w-100 { width: 100%; }

/* Layout Screens */
.screen {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    z-index: 10;
}

#main-screen {
    justify-content: flex-start;
    padding-top: 40px;
}

/* Glassmorphism Cards */
.card.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

/* Auth Screen specific */
#auth-screen h2 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}
#auth-screen p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Form Styles */
.input-group {
    text-align: right;
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}

.input-group label .optional {
    font-size: 0.8em;
    color: var(--text-secondary);
    font-weight: normal;
}

input[type="text"],
input[type="password"],
textarea,
input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(209, 154, 154, 0.2);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(209, 154, 154, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(209, 154, 154, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(209, 154, 154, 0.2);
    transform: translateY(-2px);
}

/* Messages Feed */
.app-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}
.app-header h1 {
    color: var(--primary-dark);
    font-size: 2.5rem;
}
.app-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.form-section {
    margin-bottom: 40px;
}
.form-section h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: right;
}

.feed-section h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: right;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: right;
    animation: fadeInUp 0.5s ease;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-author {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.message-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.message-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Error Text */
.error-text {
    color: var(--error-color);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Floating Hearts Animation (React Animation Effect) */
#hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    bottom: -50px;
    font-size: 20px;
    color: var(--primary-color);
    opacity: 0.6;
    animation: floatUp linear forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(-110vh) scale(1.5) rotate(360deg); opacity: 0; }
}

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

/* Responsive */
@media (max-width: 600px) {
    .screen { padding: 15px; }
    .card.glass { padding: 20px; }
}

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

.modal.hidden {
    display: none !important;
}

.modal-content {
    position: relative;
    max-width: 90%;
    width: 400px;
    animation: fadeInUp 0.4s ease;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--error-color);
}
