@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --primary-color: #D8563E;
    --secondary-color: #1a1a1a;
    --background-dark: #121212;
    --text-light: #f0f0f0;
    --text-dark: #333;
    --border-radius: 12px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.8);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.popup-content {
    background: var(--background-dark);
    color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    max-width: 850px;
    width: 90%;
    animation: slideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1001;
    transform: translateZ(0); /* Force hardware acceleration */
}

.close-popup:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.countdown-circle {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: 2px solid transparent;
    background-image: conic-gradient(var(--primary-color) 0deg, transparent 0deg);
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), white calc(100% - 2px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), white calc(100% - 2px));
    animation: countdown-rotate 20s linear infinite;
}

@keyframes countdown-rotate {
    from {
        background-image: conic-gradient(var(--primary-color) 0deg, transparent 0deg);
    }
    to {
        background-image: conic-gradient(var(--primary-color) 360deg, transparent 360deg);
    }
}

.popup-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    align-items: stretch;
}

.popup-image {
    position: relative;
    overflow: hidden;
}

.popup-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(18, 18, 18, 0), rgba(18, 18, 18, 1) 95%);
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup-text {
    text-align: left;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: rgba(240, 240, 240, 0.8);
}

.popup-speaker {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), #ff8a73);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popup-details {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px; /* Adjusted margin */
    color: rgba(240, 240, 240, 0.9);
}

.popup-themes {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
}

.popup-themes li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 5px;
}

.popup-themes li::before {
    content: '›';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.popup-info-snippets {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.popup-info-snippets span {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.popup-cta {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(240, 240, 240, 0.7);
    margin-bottom: 25px;
}

.popup-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.3s, box-shadow 0.3s;
    align-self: flex-start;
    border: none;
}

.popup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(216, 86, 62, 0.3);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .close-popup {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .popup-grid {
        grid-template-columns: 1fr;
    }

    .popup-image {
        height: 200px;
    }
    
    .popup-image::after {
        background: linear-gradient(to top, rgba(18, 18, 18, 1) 5%, rgba(18, 18, 18, 0) 80%);
    }

    .popup-text {
        padding: 30px 25px;
        margin-top: -50px;
        z-index: 2;
        text-align: center;
    }

    .popup-info-snippets {
        justify-content: center;
    }

    .popup-speaker {
        font-size: 2.2rem;
    }

    .popup-button {
        align-self: center;
    }
}
