/* Ela & Hüseyin - Anı Defteri Stilleri */

:root {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary: #9c27b0;
    --accent: #ffd700;
    --bg-start: #fce4ec;
    --bg-end: #f3e5f5;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-500: #9e9e9e;
    --gray-700: #616161;
    --gray-900: #212121;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --shadow-sm: 0 2px 8px rgba(233, 30, 99, 0.1);
    --shadow-md: 0 4px 16px rgba(233, 30, 99, 0.15);
    --shadow-lg: 0 8px 32px rgba(233, 30, 99, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    --header-height: 60px;
    --nav-height: 70px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.5;
}

/* === AUTH SCREENS === */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.auth-hearts {
    margin-bottom: 20px;
}

.auth-hearts i {
    font-size: 2rem;
    color: var(--primary);
    margin: 0 5px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.auth-hearts i:nth-child(2) {
    animation-delay: 0.2s;
}

.auth-hearts i:nth-child(3) {
    animation-delay: 0.4s;
}

.auth-container h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.auth-description {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Google Login Button */
.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.google-login-btn:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.auth-note {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* User Avatar */
.user-avatar-large {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* PIN Form */
.pin-form {
    margin-top: 30px;
}

.pin-input-wrapper {
    margin-bottom: 20px;
}

.pin-input-wrapper input {
    width: 100%;
    padding: 16px;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.pin-input-wrapper input:focus {
    border-color: var(--primary);
}

.pin-input-wrapper input.shake {
    animation: shake 0.5s ease-in-out;
}

.pin-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pin-submit-btn:hover {
    background: var(--primary-dark);
}

.logout-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-link:hover {
    color: var(--primary);
}

/* === APP LAYOUT === */
.app-container {
    min-height: 100vh;
    padding-bottom: var(--nav-height);
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: var(--shadow-sm);
}

.header-left .couple-names {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.heart-pulse {
    color: var(--primary);
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
    margin: 0 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.days-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.days-counter i {
    color: var(--primary);
}

.user-menu {
    cursor: pointer;
}

.user-avatar {
    font-size: 1.5rem;
}

/* Main Content */
.app-main {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    flex: 1;
    background: var(--white);
    padding: 16px 12px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    display: block;
}

.stat-item small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.stat-item.upcoming span {
    font-size: 0.9rem;
}

/* Memories */
.memories-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

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

.memories-header h2 {
    font-size: 1.3rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-memory-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.add-memory-btn:hover {
    background: var(--primary-dark);
}

/* Memory Card */
.memory-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.memory-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.memory-card.important {
    border-left: 4px solid var(--accent);
}

.memory-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.memory-icon {
    font-size: 2rem;
    line-height: 1;
}

.memory-info {
    flex: 1;
}

.memory-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.memory-date {
    font-size: 0.85rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.memory-description {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--gray-700);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.memory-photos-preview {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}

.memory-photos-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.memory-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-500);
}

.memory-added-by {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Loading */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

.loading-indicator i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn i {
    font-size: 1.3rem;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn.add-btn {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    margin-top: -20px;
    box-shadow: var(--shadow-md);
}

.nav-btn.add-btn i {
    font-size: 1.5rem;
}

/* User Dropdown */
.user-dropdown {
    position: fixed;
    top: var(--header-height);
    right: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 200;
    overflow: hidden;
}

.user-dropdown.hidden {
    display: none;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
}

.user-avatar-small {
    font-size: 1.5rem;
}

.user-info strong {
    display: block;
    font-size: 0.95rem;
}

.user-info small {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--gray-700);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item.logout {
    color: var(--error);
}

/* === MODALS === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-full);
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-200);
}

/* Form Styles */
.memory-form {
    padding: 20px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Photo Upload */
.photo-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-placeholder i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.upload-placeholder p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.photo-preview {
    position: relative;
    width: 80px;
    height: 80px;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.photo-preview .remove-photo {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* Detail Modal */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

.detail-icon {
    font-size: 3rem;
}

.detail-title {
    font-size: 1.5rem;
    color: var(--gray-900);
}

.detail-date {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.detail-body {
    padding: 24px;
}

.detail-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 24px;
}

.detail-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.detail-photos img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.detail-photos img:hover {
    transform: scale(1.02);
}

.detail-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
}

.detail-actions .btn {
    flex: 1;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
    border: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    background: var(--white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--error);
}

.toast.warning i {
    color: var(--warning);
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
}

/* Animations */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 600px) {
    .auth-container {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-wrap: wrap;
    }

    .stat-item {
        min-width: calc(50% - 6px);
    }

    .memories-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .nav-btn span {
        display: none;
    }

    .modal-content {
        max-height: 95vh;
    }
}
