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

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

:root {
    /* Primary Colors */
    --primary-color: #3067F0;
    --accent-color: #FFD730;
    --bg-dark: #10181E;
    --text-light: #FFFFFF;
    --text-dark: #10181E;
    
    /* Secondary Colors */
    --secondary-color: #6D37FF;
    --purple-light: #8750FF;
    --electric-blue: #00BFDB;
    --info: #01CCFF;
    --success-dark: #0C7940;
    --success: #1BB55F;
    --warning-dark: #F44747;
    --warning: #FC846B;
    
    /* Greyscale */
    --grey-darkest: #111A24;
    --bg-light: #18222C;
    --grey-dark-3: #203041;
    --grey-dark-2: #283E54;
    --grey-dark-1: #4C5C70;
    --grey-mid: #6F7F90;
    --text-muted: #6F7F90;
    --grey-light-2: #D9E1EB;
    --grey-light-1: #F2F2F8;
    --grey-lightest: #FCFCFC;
    
    /* WazirX Brand Colors */
    --wazirx-blue: #3067F0;
    --wazirx-yellow: #FFD730;
    --wazirx-purple: #6D37FF;
    --wazirx-black: #10181E;
    --wazirx-white: #FFFFFF;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #FFFFFF;
    color: var(--text-dark);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(48, 103, 240, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 48, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(109, 55, 255, 0.06) 0%, transparent 50%);
    animation: bgShift 10s ease infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes bgShift {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.2) rotate(5deg);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 90px;
}

/* Compact Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(48, 103, 240, 0.1);
    box-shadow: 0 4px 20px rgba(48, 103, 240, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.top-bar::before {
    display: none;
}

.brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.brand-logo {
    font-size: 1.5rem;
    animation: none;
    filter: drop-shadow(0 0 10px rgba(255, 215, 48, 0.5));
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(
        120deg,
        var(--wazirx-blue),
        var(--wazirx-purple)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.brand-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.8;
    line-height: 1;
}

.icon-btn {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.wallet-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(240, 147, 251, 0.4);
}

.wallet-btn.connected {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.wallet-icon {
    font-size: 1.2rem;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.search-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.05rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.filter-buttons {
    display: none;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid rgba(48, 103, 240, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(48, 103, 240, 0.08);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    background: rgba(48, 103, 240, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(48, 103, 240, 0.2);
    border-color: rgba(48, 103, 240, 0.4);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--wazirx-blue), var(--wazirx-purple));
    border-color: transparent;
    color: white;
    box-shadow: 
        0 10px 40px rgba(48, 103, 240, 0.5),
        0 0 30px rgba(109, 55, 255, 0.3);
    transform: scale(1.05);
}

.filter-btn .count {
    background: rgba(255, 215, 48, 0.25);
    color: var(--wazirx-yellow);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    border: 1px solid rgba(255, 215, 48, 0.3);
    box-shadow: 0 0 15px rgba(255, 215, 48, 0.3);
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Timeline Grid Layout */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 0;
}

.timeline::before {
    display: none;
}

.timeline-item {
    position: relative;
    height: 300px;
    perspective: 1000px;
    animation: fadeInUp 0.5s ease;
    margin-bottom: 0;
}

.timeline-item::after {
    display: none;
}

.timeline-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.timeline-item:hover .timeline-item-inner {
    transform: rotateY(180deg);
}

.timeline-item-front,
.timeline-item-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timeline-item-front {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(48, 103, 240, 0.15);
    box-shadow: 
        0 10px 40px rgba(48, 103, 240, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(48, 103, 240, 0.05);
    transition: all 0.4s ease;
}

.timeline-item:hover .timeline-item-front {
    box-shadow: 
        0 20px 60px rgba(48, 103, 240, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(48, 103, 240, 0.2);
    border-color: rgba(48, 103, 240, 0.3);
}

.timeline-item-front::before {
    display: none;
}

.timeline-item-back {
    background: linear-gradient(135deg, var(--wazirx-blue), var(--wazirx-purple));
    transform: rotateY(180deg);
    box-shadow: 0 20px 60px rgba(48, 103, 240, 0.4);
}

.timeline-item::before {
    display: none;
}

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



.timeline-date {
    display: inline-block;
    padding: 8px 20px;
    background: var(--wazirx-yellow);
    color: var(--wazirx-black);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 215, 48, 0.4);
    letter-spacing: 0.5px;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.timeline-description {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.timeline-category {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 18px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    align-self: flex-start;
}

.timeline-category.milestone {
    background: rgba(27, 181, 95, 0.2);
    color: var(--success);
    border-color: rgba(27, 181, 95, 0.4);
    box-shadow: 0 0 15px rgba(27, 181, 95, 0.3);
}

.timeline-item:hover .timeline-category.milestone {
    box-shadow: 0 0 25px rgba(27, 181, 95, 0.6);
}

.timeline-category.launch {
    background: rgba(1, 204, 255, 0.2);
    color: var(--info);
    border-color: rgba(1, 204, 255, 0.4);
    box-shadow: 0 0 15px rgba(1, 204, 255, 0.3);
}

.timeline-item:hover .timeline-category.launch {
    box-shadow: 0 0 25px rgba(1, 204, 255, 0.6);
}

.timeline-category.update {
    background: rgba(252, 132, 107, 0.2);
    color: var(--warning);
    border-color: rgba(252, 132, 107, 0.4);
    box-shadow: 0 0 15px rgba(252, 132, 107, 0.3);
}

.timeline-item:hover .timeline-category.update {
    box-shadow: 0 0 25px rgba(252, 132, 107, 0.6);
}

.timeline-item.hidden {
    display: none;
}

/* Year Separators */
.year-separator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0 10px 0;
    position: relative;
    margin: 20px 0;
}

.year-separator h2 {
    display: inline-block;
    padding: 12px 35px;
    background: linear-gradient(135deg, var(--wazirx-blue), var(--wazirx-purple));
    border-radius: 30px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 30px rgba(48, 103, 240, 0.25);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.year-separator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(48, 103, 240, 0.3) 20%, 
        rgba(48, 103, 240, 0.3) 80%, 
        transparent
    );
    z-index: 0;
}

/* Add Event Section */
.add-event-section {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

.add-btn {
    padding: 18px 50px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-btn:hover::before {
    width: 300px;
    height: 300px;
}

.add-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 50px rgba(102, 126, 234, 0.6),
        0 0 40px rgba(240, 147, 251, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, var(--bg-light), var(--bg-dark));
    margin: 5% auto;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-light);
}

.modal h2 {
    margin-bottom: 30px;
    color: var(--text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.detail-modal .modal-content {
    max-width: 800px;
}

#detailContent h2 {
    margin-bottom: 20px;
}

#detailContent .detail-date {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

#detailContent .detail-description {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

#detailContent .detail-category {
    margin: 15px 0;
}

#detailContent h3 {
    color: var(--text-light);
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding-top: 10px;
    }
    
    .top-bar {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .brand-logo {
        font-size: 1.3rem;
    }
    
    .brand-name {
        font-size: 1.2rem;
    }
    
    .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        padding: 0 10px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .timeline {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 5px;
    }
    
    .timeline-item {
        height: 260px;
    }
    
    .timeline-item-front,
    .timeline-item-back {
        padding: 20px;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }
    
    .timeline-date {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
    
    .timeline-category {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    .year-separator {
        padding: 20px 0 10px 0;
        margin: 10px 0;
    }
    
    .year-separator h2 {
        font-size: 1.2rem;
        padding: 10px 25px;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        padding: 20px;
        margin: 15% auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .filter-btn {
        padding: 7px 12px;
        font-size: 0.75rem;
    }
    
    .timeline-item {
        height: 240px;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .year-separator h2 {
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .modal-content {
        padding: 15px;
        margin: 10% auto;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Scroll Animation */
.timeline-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

/* Light Theme */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-dark: #ffffff;
    --bg-light: #f8f9fa;
    --text-light: #2d3748;
    --text-muted: #4a5568;
}

body.light-theme .header,
body.light-theme .controls,
body.light-theme .timeline-item {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .search-input,
body.light-theme .form-group input,
body.light-theme .form-group textarea,
body.light-theme .form-group select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-light);
}

body.light-theme .filter-btn {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
}

body.light-theme .modal-content {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

body.light-theme .timeline::before {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

body.light-theme .icon-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .action-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Enhanced Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.wallet-btn.connected .wallet-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Card back details styling */
.timeline-item-back h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.timeline-item-back p {
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Hover instruction */
.timeline-item-front::after {
    content: '↻ Hover to flip';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timeline-item:hover .timeline-item-front::after {
    opacity: 0.6;
}

/* Enhanced grid animations */
@keyframes gridPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.timeline-item {
    animation: gridPop 0.6s ease forwards;
}


