:root {
    --primary-yellow: #ffe81f; /* Star Wars yellow */
    --secondary-blue: #00bfff; /* A bright blue for highlights */
    --dark-bg: #1a1a1a; /* Very dark grey for background */
    --text-color: #f0f0f0; /* Light grey for general text */
    --hover-gold: #ffcc00; /* A slightly deeper gold for hover states */
    --shadow-color: rgba(255, 232, 31, 0.6); /* Yellowish shadow */
}

/* Base Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Star Jedi Font for Titles */
.main-title, .hub-button {
    font-family: 'Star Jedi', sans-serif;
}

/* Header and Hero Section */
.hero {
    background: url('https://raw.githubusercontent.com/galactic-empire-technologies/Star-Wars-Hub-Landing-Page/main/bg.png') no-repeat center center/cover;
    color: var(--primary-yellow);
    text-align: center;
    padding: 60px 20px;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
    animation: background-pan 60s linear infinite alternate;
}

@keyframes background-pan {
    from {
        background-position: 0% 0%;
    }
    to {
        background-position: 100% 100%;
    }
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--shadow-color);
    animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
    margin-top: 0;
}

/* Main Content - Button Container */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 50px 20px;
    flex-grow: 1;
}

.hub-button {
    background-color: var(--dark-bg);
    border: 2px solid var(--primary-yellow);
    color: var(--primary-yellow);
    padding: 25px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 232, 31, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 350px;
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.hub-button::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: 0.5s;
}

.hub-button:hover::before {
    left: 100%;
}

.hub-button:hover {
    background-color: rgba(255, 232, 31, 0.1);
    color: var(--hover-gold);
    box-shadow: 0 0 30px rgba(255, 232, 31, 0.8), 0 0 40px rgba(0, 191, 255, 0.4);
    transform: translateY(-5px) scale(1.02);
    border-color: var(--hover-gold);
}

.button-icon {
    font-size: 3rem;
    margin-bottom: 5px;
    color: var(--secondary-blue);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.6);
    transition: inherit;
}

.hub-button:hover .button-icon {
    color: var(--primary-yellow);
    text-shadow: 0 0 15px var(--primary-yellow);
}

.button-description {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 10px;
    opacity: 0.8;
    transition: inherit;
}

.hub-button:hover .button-description {
    opacity: 1;
    color: white;
}

/* Footer */
.footer {
    background-color: #000;
    color: var(--text-color);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 232, 31, 0.3);
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.2rem;
    }
    .hub-button {
        padding: 20px 25px;
        font-size: 1.5rem;
        max-width: 90%;
    }
    .button-icon {
        font-size: 2.5rem;
    }
    .button-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    .hero {
        padding: 40px 15px;
    }
    .button-container {
        padding: 30px 15px;
        gap: 20px;
    }
    .hub-button {
        font-size: 1.3rem;
        padding: 15px 20px;
    }
    .button-icon {
        font-size: 2rem;
    }
}

/* Iframe Modal Overlay */
.iframe-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    backdrop-filter: blur(5px); /* Optional blur effect */
}

.iframe-modal-content {
    position: relative;
    background-color: var(--dark-bg);
    margin: auto; /* Centered */
    padding: 20px;
    border: 3px solid var(--primary-yellow);
    box-shadow: 0 0 30px rgba(255, 232, 31, 0.8);
    width: 90%; /* Responsive width */
    max-width: 1200px; /* Max width for larger screens */
    height: 90vh; /* Responsive height */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.iframe-modal-content iframe {
    flex-grow: 1; /* Take up all available space */
    width: 100%;
    height: 100%; /* Important for flex-grow to work */
    border: none;
    background-color: #000; /* Black background for iframe itself */
    border-radius: 8px;
}

.iframe-close-button {
    color: var(--primary-yellow);
    font-size: 2rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.7);
    transition: color 0.2s ease, transform 0.2s ease;
}

.iframe-close-button:hover,
.iframe-close-button:focus {
    color: var(--secondary-blue);
    text-decoration: none;
    transform: scale(1.1);
    outline: none;
}

/* Feedback Modal Specific Styles */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Higher than iframe modal */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.95); /* Darker background */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    backdrop-filter: blur(8px); /* More blur */
}

.modal-content {
    position: relative;
    background-color: var(--dark-bg);
    margin: auto;
    padding: 30px;
    border: 3px solid var(--primary-yellow);
    box-shadow: 0 0 40px rgba(255, 232, 31, 0.9);
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h2 {
    font-family: 'Star Jedi', sans-serif;
    color: var(--primary-yellow);
    text-align: center;
    margin-top: 0;
    font-size: 2.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.7);
}

.modal-content p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.modal-close-button {
    color: var(--primary-yellow);
    font-size: 2.5rem;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.7);
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: var(--secondary-blue);
    transform: scale(1.15);
    outline: none;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-form label {
    font-size: 1.1rem;
    color: var(--secondary-blue);
    margin-bottom: 5px;
}

.feedback-form textarea {
    background-color: #2a2a2a;
    border: 1px solid var(--primary-yellow);
    border-radius: 8px;
    padding: 15px;
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    resize: vertical; /* Allow vertical resizing */
    box-shadow: inset 0 0 8px rgba(255, 232, 31, 0.3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: inset 0 0 8px rgba(0, 191, 255, 0.5), 0 0 10px rgba(0, 191, 255, 0.5);
}

.submit-button {
    background-color: var(--primary-yellow);
    color: var(--dark-bg);
    border: none;
    border-radius: 8px;
    padding: 15px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 232, 31, 0.6);
}

.submit-button:hover {
    background-color: var(--hover-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 232, 31, 0.8);
}

/* Style for the feedback button in the footer */
.feedback-button {
    background: none;
    border: none;
    color: var(--primary-yellow);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem; /* Match footer text size */
    padding: 0;
    margin: 0;
    font-family: inherit; /* Inherit font from parent */
    transition: color 0.2s ease;
}

.feedback-button:hover {
    color: var(--secondary-blue);
}

/* Responsive adjustments for feedback modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 25px;
    }
    .modal-content h2 {
        font-size: 1.8rem;
    }
    .modal-close-button {
        font-size: 2rem;
        top: 10px;
        right: 15px;
    }
    .submit-button {
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }
    .modal-content h2 {
        font-size: 1.5rem;
    }
    .modal-close-button {
        font-size: 1.8rem;
        top: 8px;
        right: 12px;
    }
    .feedback-form label {
        font-size: 1rem;
    }
    .feedback-form textarea {
        padding: 10px;
        font-size: 0.9rem;
    }
    .submit-button {
        padding: 10px 15px;
        font-size: 1rem;
    }
}