/*
 * Graduation Invitation Webpage Styles
 * Theme: Luxury Metallic Gold & Cream Linen Paper
 * Author: Trần Xuân Tài
 */

:root {
    --bg-paper: #FDFBF7;
    --bg-card: #FFFFFF;
    --text-primary: #2C2825;
    --text-secondary: #665E57;
    
    /* Gold Metallic Palette */
    --gold-primary: #C5A059;
    --gold-dark: #8C6A27;
    --gold-light: #F4E8C1;
    --gold-gradient: linear-gradient(135deg, #A87B28 0%, #E4CA76 35%, #8B651B 70%, #F7E49D 100%);
    --gold-glow: rgba(197, 160, 89, 0.25);
    
    --accent-red: #B83232;
    
    --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.07), 0 6px 18px rgba(197, 160, 89, 0.12);
    --shadow-hover: 0 25px 55px rgba(140, 106, 39, 0.2);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    --font-script: 'Alex Brush', 'Great Vibes', cursive;
    --font-sans: 'Montserrat', 'Inter', -apple-system, sans-serif;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: #F8F5EE;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(228, 202, 118, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(168, 123, 40, 0.12) 0%, transparent 45%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Particle Background Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* Main Outer Wrapper */
.main-wrapper {
    width: 100%;
    max-width: 650px;
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

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

/* Invitation Card Frame */
.invitation-card {
    background-color: var(--bg-paper);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 3.8rem 2.8rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.invitation-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: calc(var(--radius-lg) - 6px);
    pointer-events: none;
}

/* Botanical Floral Corner Accents */
.floral-corner {
    position: absolute;
    width: 120px;
    height: 120px;
    color: var(--gold-primary);
    opacity: 0.8;
    pointer-events: none;
    z-index: 3;
}

.floral-corner.top-left {
    top: 14px;
    left: 14px;
}

.floral-corner.top-right {
    top: 14px;
    right: 14px;
}

.floral-corner.bottom-left {
    bottom: 14px;
    left: 14px;
}

.floral-corner.bottom-right {
    bottom: 14px;
    right: 14px;
}

.floral-svg {
    width: 100%;
    height: 100%;
}

/* Header Typography */
.card-header {
    margin-bottom: 2.2rem;
}

.sub-invitation {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--gold-dark);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.main-title {
    font-family: var(--font-serif);
    font-size: 2.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.script-title {
    font-family: var(--font-script);
    font-size: 3rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 1px;
    margin-top: -0.4rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Avatar Frame Styling */
.avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.avatar-frame {
    position: relative;
    width: 290px;
    height: 375px;
    border-radius: 16px;
    padding: 12px;
    background: #FFFFFF;
    box-shadow: 
        0 14px 32px rgba(0, 0, 0, 0.1),
        0 0 0 2px var(--gold-primary),
        0 0 0 7px var(--bg-paper),
        0 0 0 10px rgba(197, 160, 89, 0.45);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.avatar-frame:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 
        0 18px 36px rgba(140, 106, 39, 0.2),
        0 0 0 2px var(--gold-primary),
        0 0 0 7px var(--bg-paper),
        0 0 0 10px rgba(197, 160, 89, 0.6);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.frame-badge {
    position: absolute;
    bottom: -18px;
    right: -16px;
    background: var(--gold-gradient);
    color: #FFFFFF;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(140, 106, 39, 0.35);
    border: 2px solid #FFFFFF;
}

/* Honor Section Typography */
.honor-section {
    margin-bottom: 1rem;
}

.in-honor-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.graduate-name {
    font-family: var(--font-script);
    font-size: 3.8rem;
    font-weight: 500;
    color: var(--gold-dark);
    line-height: 1.25;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 6px rgba(197, 160, 89, 0.18);
}

.graduate-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--text-secondary);
}

/* Wax Seal Badge */
.wax-seal {
    display: inline-flex;
    margin: 1rem auto 0.5rem;
}

.wax-seal-inner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(140, 106, 39, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.6);
}

.wax-seal-inner i {
    font-size: 1.1rem;
    margin-bottom: -1px;
}

/* Gold Divider Line */
.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.8rem auto;
    width: 70%;
    position: relative;
}

.gold-divider::before,
.gold-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.gold-divider .diamond {
    color: var(--gold-primary);
    font-size: 0.75rem;
    padding: 0 10px;
}

/* Event Details Card Box */
.event-details-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: var(--radius-md);
    padding: 2rem 1.8rem;
    margin-bottom: 2.2rem;
    box-shadow: inset 0 0 25px rgba(197, 160, 89, 0.06);
    text-align: left;
}

.event-box-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-dark);
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
}

.info-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold-light);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.info-value {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 3px;
    line-height: 1.4;
}

/* Map Embed Wrapper Styling */
.map-embed-wrapper {
    margin-top: 1.4rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid rgba(197, 160, 89, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.map-embed-wrapper:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 6px 18px rgba(197, 160, 89, 0.25);
}

.map-embed-wrapper iframe {
    display: block;
    width: 100%;
}

.highlight-red {
    color: var(--accent-red);
}

/* Countdown Section */
.countdown-section {
    margin-bottom: 2.4rem;
}

.countdown-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--gold-dark);
    margin-bottom: 1.2rem;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
}

.time-box {
    background: var(--gold-gradient);
    color: #FFFFFF;
    padding: 0.9rem 0.7rem;
    border-radius: var(--radius-sm);
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 14px rgba(140, 106, 39, 0.22);
}

.time-num {
    font-family: var(--font-sans);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.time-unit {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    opacity: 0.92;
}

.time-colon {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
}

/* Action Buttons */
.actions-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem 1.8rem;
    font-family: var(--font-sans);
    font-size: 0.98rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-gold {
    background: var(--gold-gradient);
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(140, 106, 39, 0.32);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(140, 106, 39, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--gold-dark);
    border: 1.8px solid var(--gold-primary);
}

.btn-outline:hover {
    background: var(--gold-light);
    color: var(--gold-dark);
    transform: translateY(-2px);
}

/* Toast Notification Styling */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #FFFFFF;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 10px 30px rgba(140, 106, 39, 0.25);
    border-radius: 50px;
    padding: 0.9rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.8rem;
    color: var(--gold-primary);
}

.toast-content strong {
    font-size: 0.95rem;
    color: var(--gold-dark);
    display: block;
}

.toast-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Footer Message */
.card-footer {
    border-top: 1px solid rgba(197, 160, 89, 0.25);
    padding-top: 1.6rem;
    margin-top: 1rem;
}

.card-footer p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Floating Music Toggle Button */
.music-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 6px 18px rgba(140, 106, 39, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 90;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-toggle-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 25px rgba(140, 106, 39, 0.5);
}

.music-toggle-btn.playing {
    animation: spinSlow 6s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 576px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .invitation-card {
        padding: 2.5rem 1.4rem;
        border-radius: var(--radius-md);
    }
    
    .main-title {
        font-size: 2.1rem;
    }
    
    .script-title {
        font-size: 2.4rem;
    }
    
    .graduate-name {
        font-size: 3rem;
    }
    
    .avatar-frame {
        width: 240px;
        height: 310px;
    }
    
    .floral-corner {
        width: 80px;
        height: 80px;
    }
    
    .time-box {
        min-width: 58px;
        padding: 0.7rem 0.4rem;
    }
    
    .time-num {
        font-size: 1.4rem;
    }
}
