/* ================================
   Guest Book Page Styles
   ================================ */

.guestbook-main {
    min-height: 100vh;
    padding: 120px 40px 80px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.guestbook-header {
    text-align: center;
    margin-bottom: 50px;
}

.guestbook-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #fbbf24 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-icon {
    display: flex;
    color: #f59e0b;
    -webkit-text-fill-color: initial;
}

.guestbook-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Add Note Button */
.add-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bg-darker);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.3);
}

.add-note-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.4);
}

.add-note-btn svg {
    transition: transform 0.3s ease;
}

.add-note-btn:hover svg {
    transform: rotate(90deg);
}

/* Stats Bar */
.guestbook-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 24px 40px;
    border-radius: var(--radius-xl);
    margin-bottom: 50px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-stars {
    display: flex;
    gap: 4px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--glass-border);
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Note Card */
.note-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: noteAppear 0.5s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes noteAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(245, 158, 11, 0.1);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.note-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.note-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.note-info {
    flex: 1;
}

.note-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.note-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.note-rating {
    display: flex;
    gap: 3px;
}

.note-rating svg {
    width: 16px;
    height: 16px;
}

.note-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.empty-state.visible {
    display: flex;
}

.empty-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
}

/* ================================
   Modal Styles
   ================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: var(--radius-xl);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Avatar Upload */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.avatar-upload-text span {
    font-weight: 600;
    color: var(--text-primary);
}

.avatar-upload-text small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Rating Stars */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.rating > label {
    margin-right: 4px;
}

.rating:not(:checked) > input {
    display: none;
}

.rating:not(:checked) > label {
    cursor: pointer;
    font-size: 32px;
}

.rating:not(:checked) > label > svg {
    fill: #444;
    transition: fill 0.3s ease, transform 0.2s ease;
}

.rating > label:hover > svg {
    transform: scale(1.2);
}

.rating > input:checked ~ label > svg {
    fill: #ffa723;
}

.rating:not(:checked) > label:hover ~ label > svg,
.rating:not(:checked) > label:hover > svg {
    fill: #ff9e0b;
}

#star1:hover ~ label > svg,
#star1:hover > svg {
    fill: #a23c3c !important;
}

#star2:hover ~ label > svg,
#star2:hover > svg {
    fill: #99542d !important;
}

#star3:hover ~ label > svg,
#star3:hover > svg {
    fill: #9f7e18 !important;
}

#star4:hover ~ label > svg,
#star4:hover > svg {
    fill: #22885e !important;
}

#star5:hover ~ label > svg,
#star5:hover > svg {
    fill: #7951ac !important;
}

#star1:checked ~ label > svg {
    fill: #ef4444;
}

#star2:checked ~ label > svg {
    fill: #e06c2b;
}

#star3:checked ~ label > svg {
    fill: #eab308;
}

#star4:checked ~ label > svg {
    fill: #19c37d;
}

#star5:checked ~ label > svg {
    fill: #ab68ff;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bg-darker);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Active nav state */
.nav-cta.active {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #fbbf24 !important;
}

/* ================================
   Toast Notifications
   ================================ */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    max-width: 420px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin: -4px -8px -4px 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: toast-progress 5s linear forwards;
}

.toast-success .toast-progress {
    background: linear-gradient(90deg, #10b981, #059669);
}

.toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.toast-warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ================================
   Loading & Error States
   ================================ */
.loading-state,
.error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state svg {
    color: #ef4444;
    margin-bottom: 16px;
}

.error-state p {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.retry-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bg-darker);
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

/* Spinner for submit button */
.submit-btn .spinner {
    animation: spin 1s linear infinite;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .guestbook-main {
        padding: 100px 20px 60px;
    }
    
    .guestbook-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 12px;
    }
    
    .guestbook-stats {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }
    
    .stat-divider {
        width: 50px;
        height: 1px;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .modal {
        padding: 24px;
    }
    
    .rating:not(:checked) > label {
        font-size: 28px;
    }
    
    .toast-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

