/* ============================================
   Global Styles & Variables
   ============================================ */
:root {
    --primary-color: #c41e3a;
    --secondary-color: #1a1a1a;
    --background-color: #0d0d0d;
    --text-color: #ffffff;
    --text-light: #b0b0b0;
    --accent-color: #ff2d55;
    --border-color: #333333;
    --hover-color: #ff3d65;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.2);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.lang-toggle:hover {
    background-color: var(--accent-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 50%, #1a1a1a 100%);
    text-align: center;
}

.hero-content {
    max-width: 1000px;
    /* Keep text readable */
    margin: 0 auto 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(196, 30, 58, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

/* ============================================
   Sections & Common Styles
   ============================================ */
.section {
    padding: 3rem 2rem;
    max-width: 95%;
    margin: 0 auto;
    width: 100%;
}

.featured-section {
    margin: 3rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-header {
    margin-bottom: 3rem;
}

/* ============================================
   Games Grid & Cards
   ============================================ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.game-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Force square shape */
    overflow: hidden;
    background: #000;
    /* Black background for any letterboxing */
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full image is visible */
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.game-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* Fixed height for 2 lines */
}

.game-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    /* Pushes content to bottom */
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.stars {
    display: flex;
    gap: 0.3rem;
    cursor: pointer;
}

.star {
    font-size: 1.2rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.star.filled {
    color: var(--primary-color);
}

.star:hover,
.star.hover {
    color: var(--primary-color);
}

.rating-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

.game-actions {
    display: flex;
    gap: 0.5rem;
}

.game-action-btn {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.game-action-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.game-action-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ============================================
   Filter Buttons & Search
   ============================================ */
.search-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    /* Needed for positioning clear button if we wanted absolute, but flex is fine here */
    align-items: center;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
    /* Optional: Absolute positioning inside input if preferred */
    position: absolute;
    right: 70px;
    /* Position left of search button */
    top: 50%;
    transform: translateY(-50%);
}

.clear-btn:hover {
    color: var(--primary-color);
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.3);
}

.search-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.filter-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 2rem;
}

.modal-body h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-body img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.modal-rating {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
}

.modal-rating p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   Favorites Section
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* ============================================
   About Section
   ============================================ */
.about-container {
    max-width: 1000px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
}

.about-text ul li {
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
}

.about-text ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.about-social h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a,
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-links a:hover,
.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-top: 2px solid var(--primary-color);
    margin-top: 3rem;
    color: var(--text-color);
}

.footer-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.contact-link i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-link:hover i {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

/* ============================================
   Pagination Controls
   ============================================ */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #2a2a2a;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.4);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #1a1a1a;
}


/* ============================================
   Game Count Badge
   ============================================ */
.game-count-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 10px;
    transform: translateY(-3px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* RTL support for badge margin */
html[dir="rtl"] .game-count-badge {
    margin-left: 0;
    margin-right: 10px;
}



/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--secondary-color);
        gap: 0;
        border-bottom: 2px solid var(--primary-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
    }

    .nav-link::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }

    .search-container {
        flex-direction: column;
        max-width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
    }

    .filter-container {
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: slideInUp 0.6s ease-out;
}

/* ============================================
   Chatbot Widget
   ============================================ */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background-color: var(--accent-color);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.chatbot-header {
    background-color: var(--primary-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #121212;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
}

.bot-message {
    background-color: #2a2a2a;
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chatbot-input-area {
    padding: 1rem;
    background-color: #1a1a1a;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

#chatbotInput {
    flex: 1;
    padding: 0.8rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background-color: #2a2a2a;
    color: white;
    outline: none;
}

#chatbotInput:focus {
    border-color: var(--primary-color);
}

#chatbotSend {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

#chatbotSend:hover {
    background-color: var(--accent-color);
}

@media (max-width: 480px) {
    .chatbot-window {
        width: 300px;
        height: 600px;
        right: -10px;
    }
}

/* ============================================
   Trailer Button & New Styles
   ============================================ */
.trailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #ff0000;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.trailer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
    background-color: #cc0000;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    margin-left: 1rem;
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.modal-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

@media (max-width: 768px) {
    .cta-button.secondary {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* ============================================
   Spin Wheel
   ============================================ */
.wheel-container {
    background: rgba(20, 20, 20, 0.95);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 0 50px rgba(196, 30, 58, 0.5);
}

.close-wheel {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.wheel {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: #333;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    /* Bezier for slowdown */
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    right: 50%;
    bottom: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px black;
    padding-left: 20px;
    /* Push text out */
    box-sizing: border-box;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.wheel-segment span {
    transform: rotate(45deg);
    /* Text adjustment */
    text-align: right;
    width: 130px;
    position: absolute;
    right: -100px;
    bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wheel-pointer {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--primary-color);
    position: absolute;
    top: 1.5rem;
    /* Adjust based on container padding */
    z-index: 5;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.spin-btn {
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    background: linear-gradient(45deg, #ff0000, #990000);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.spin-btn:active {
    transform: scale(0.95);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Team Section Styles
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.member-name {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.member-role {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.team-member .social-links {
    justify-content: center;
    gap: 1.5rem;
}

.team-member .social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.team-member .social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* ============================================
   Favorites Overlay (Page inside Page)
   ============================================ */
.favorites-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 3000;
    overflow-y: auto;
    transform: translateY(100%);
    /* Hidden by default (slide up) */
    transition: transform 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

.favorites-overlay.active {
    transform: translateY(0);
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.favorites-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.close-favorites {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-favorites:hover {
    color: var(--primary-color);
}

.favorites-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* Scrollbar for favorites */
.favorites-overlay::-webkit-scrollbar {
    width: 10px;
}

.favorites-overlay::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

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

/* ============================================
   Feedback Modal
   ============================================ */
.feedback-modal-content {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 90%;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background: #0d0d0d;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}