@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-navy: #1e3a8a;
    --primary-orange: #f97316;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #64748b;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #0f275c 50%, var(--primary-orange) 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/images/ft01_edit.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="grad" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(255,255,255,0);stop-opacity:1" /></radialGradient></defs><circle cx="20" cy="20" r="2" fill="url(%23grad)"/><circle cx="80" cy="40" r="1.5" fill="url(%23grad)"/><circle cx="40" cy="70" r="1" fill="url(%23grad)"/><circle cx="90" cy="80" r="2.5" fill="url(%23grad)"/><circle cx="10" cy="90" r="1.2" fill="url(%23grad)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, white, var(--primary-orange), white);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* Navigation */
.nav-section {
    padding: 60px 0;
    text-align: center;
}

.nav-tabs {
    display: inline-flex;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 60px;
    padding: 8px;
    gap: 8px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-tab:hover::before {
    left: 100%;
}

.nav-tab.active {
    background: linear-gradient(45deg, var(--primary-navy), var(--primary-orange));
    color: white;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Timeline Section */
.timeline-section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 80px;
    background: linear-gradient(45deg, white, var(--primary-orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-navy), var(--primary-orange));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    position: relative;
    width: 45%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    right: 0;
    margin-left: auto;
}

.timeline-content:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50px;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, var(--primary-orange), #fbbf24);
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px var(--primary-orange);
    animation: pulse 2s infinite;
}

.timeline-dot1 {
    position: absolute;
    left: 50%;
    top: 50px;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, var(--primary-navy), #2488fb);
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px var(--primary-navy);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px var(--primary-orange); }
    50% { box-shadow: 0 0 40px var(--primary-orange), 0 0 60px var(--primary-orange); }
}

.memory-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.timeline-content:hover .memory-image {
    transform: scale(1.05);
}

.memory-date {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.memory-date1 {
    color: var(--primary-navy);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.memory-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
    line-height: 1.3;
}

.memory-preview {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 1rem;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.gallery-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.8s;
}

.gallery-item:hover::before {
    left: 100%;
}

.gallery-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-info {
    padding: 30px;
}

.gallery-date {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.gallery-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease;
}

/* Image Viewer Modal */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 59, 38, 0.95);
    backdrop-filter: blur(20px);
    animation: modalFadeIn 0.3s ease;
}

.image-viewer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95vw;
    max-height: 95vh;
    text-align: center;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: imageZoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes imageZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-viewer-info {
    margin-top: 30px;
    color: white;
}

.image-viewer-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    word-break: break-word;
}

.image-viewer-date {
    color: var(--primary-orange);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-viewer-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.image-viewer-close:hover {
    color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, var(--primary-navy), #2563eb);
    margin: 2% auto;
    padding: 50px;
    border-radius: 30px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--glass-border);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 25px;
    top: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 35px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close:hover {
    color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 30px;
}

.modal-date {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 25px;
    font-weight: 600;
    line-height: 1.3;
}

.modal-text {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* Add Memory Button */
.add-memory-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-orange), #fbbf24);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(249, 115, 22, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.add-memory-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.6);
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: white;
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group .file-input-container {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-orange), #fbbf24);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(249, 115, 22, 0.4);
}

/* File Upload Styles */
.file-input-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.file-input-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.file-input-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.file-input-text {
    font-size: 0.9rem;
}

.file-preview-container {
    margin-top: 15px;
    text-align: center;
    display: none;
}

.file-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 10px;
    border: 2px solid var(--glass-border);
}

.remove-image-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: rgba(255, 100, 100, 0.3);
}

/* Image Source Toggle */
.image-source-toggle {
    display: flex;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
}

.source-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.source-option.active {
    background: var(--primary-orange);
}

.url-input-container {
    display: none;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.toast.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
        left: 0 !important;
        right: auto !important;
    }

    .timeline-dot {
        left: 30px;
        transform: none;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .modal-content {
        margin: 5% auto;
        padding: 30px 25px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .nav-tabs {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .timeline-content,
    .modal-content {
        padding: 25px 20px;
    }

    .memory-image,
    .modal-image,
    .gallery-image {
        height: 200px;
    }
    
    .image-source-toggle {
        flex-direction: column;
    }
    
    .source-option {
        margin-bottom: 5px;
    }
}