/* Contest Page Styles */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon input {
    width: 100%;
    padding-right: 30px; /* space for the icon */
    background-color: #1e1e1e;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 14px;
}

.tooltip-wrapper {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.tooltip-icon {
    width: 16px;
    height: 16px;
    fill: #6c757d; /* grey */
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    top: -45px;
    right: 0;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 12px;
    white-space: normal;
}

.tooltip-wrapper:hover .tooltip-text,
.tooltip-wrapper.clicked .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Contest Hero Section */
.contest-hero {
    background: linear-gradient(135deg,
        #1a1a2e 0%,
        #16213e 25%,
        #0f3460 50%,
        #533483 75%,
        #1a1a2e 100%);
    color: var(--text-light);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Golden particles floating effect */




/* Money rain effect */




.contest-hero .container {
    position: relative;
    z-index: 2;
}

.contest-hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg,
        #e0aaff 0%,
        #c77dff 25%,
        #9d4edd 50%,
        #7209b7 75%,
        #560bad 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
    letter-spacing: 1px;
}



.contest-hero .highlight {
    background: linear-gradient(135deg,
        #a855f7 0%,
        #8b5cf6 50%,
        #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-weight: 800;
}





.contest-hero p {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.golden-opportunity {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ff8c00;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}





.prize-pool {
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.15) 0%,
        rgba(139, 92, 246, 0.2) 25%,
        rgba(124, 58, 237, 0.15) 50%,
        rgba(109, 40, 217, 0.2) 75%,
        rgba(168, 85, 247, 0.15) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem auto;
    max-width: 600px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    box-shadow:
        0 8px 32px rgba(168, 85, 247, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.prize-pool:hover {
    transform: translateY(-5px);
    box-shadow:
        0 12px 40px rgba(168, 85, 247, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(168, 85, 247, 0.5);
}







.prize-pool h2 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg,
        #e0aaff 0%,
        #c77dff 50%,
        #9d4edd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}



.prize-pool p {
    position: relative;
    z-index: 1;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Contest Description Section */
.contest-description {
    padding: 60px 0;
    background: var(--bg-primary);
}

.description-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.description-content h2 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.description-content > p {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contest-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.highlight-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.highlight-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-item h3 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.highlight-item p {
    color: var(--text-color);
    line-height: 1.5;
}

.contest-timeline {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contest-timeline h3 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.timeline-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.timeline-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.timeline-event {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Contest Form Section */
.contest-form-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

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

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

.form-group label {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.submit-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--text-light);
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--secondary-light), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--secondary-rgb), 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Ranking Section */
.ranking-section {
    padding: 60px 0;
    background: var(--bg-primary);
}

.ranking-container {
    max-width: 1000px;
    margin: 0 auto;
}

.ranking-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
}

.ranking-table thead {
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.2) 0%,
        rgba(139, 92, 246, 0.15) 100%);
}

.ranking-table th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #e0aaff;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(168, 85, 247, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ranking-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
}

.ranking-table tbody tr {
    transition: all 0.3s ease;
}

.ranking-table tbody tr:hover {
    background: rgba(168, 85, 247, 0.05);
    transform: translateX(5px);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #fff;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.rank-badge:not(.gold):not(.silver):not(.bronze) {
    background: linear-gradient(135deg, #4a5568, #718096);
    color: #fff;
}

.points {
    font-weight: 700;
    color: #e0aaff;
    font-size: 1.1rem;
}

.rank-1 {
    background: linear-gradient(90deg,
        rgba(255, 215, 0, 0.1) 0%,
        transparent 100%);
}

.rank-2 {
    background: linear-gradient(90deg,
        rgba(192, 192, 192, 0.1) 0%,
        transparent 100%);
}

.rank-3 {
    background: linear-gradient(90deg,
        rgba(205, 127, 50, 0.1) 0%,
        transparent 100%);
}

.ranking-note {
    text-align: center;
    background: rgba(168, 85, 247, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.ranking-note p {
    color: var(--text-color);
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.ranking-note i {
    color: #e0aaff;
    margin-right: 0.5rem;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    background: var(--bg-primary);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-light);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Terms Section */
.terms-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-content h3 {
    color: var(--primary-light);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p, .terms-content li {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.terms-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
}

.prize-structure {
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.ranking-points-system {
    background: rgba(var(--secondary-rgb), 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--secondary-color);
}

.ranking-points-system h4 {
    color: var(--secondary-light);
    margin-bottom: 1rem;
}

.ranking-points-system p {
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

.ranking-points-system ul {
    margin-bottom: 1rem;
}

.prize-structure h4 {
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.prize-list {
    list-style: none;
    padding: 0;
}

.prize-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prize-list li:last-child {
    border-bottom: none;
}

.prize-position {
    font-weight: 600;
    color: var(--text-light);
}

.prize-amount {
    font-weight: 700;
    color: var(--secondary-color);
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contest-hero {
        padding: 100px 0 60px;
    }

    .contest-hero h1 {
        font-size: 2rem;
    }

    .contest-hero p {
        font-size: 1rem;
    }

    .golden-opportunity {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .prize-pool {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .prize-pool {
        padding: 2rem;
        margin: 1.5rem auto;
    }

    .prize-pool h2 {
        font-size: 2.5rem;
    }

    .description-content h2 {
        font-size: 2rem;
    }

    .description-content > p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .contest-highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .highlight-item {
        padding: 1.5rem;
    }

    .highlight-item i {
        font-size: 2.5rem;
    }

    .timeline-items {
        flex-direction: column;
        gap: 1.5rem;
    }

    .timeline-item {
        min-width: auto;
    }

    .form-container {
        padding: 2rem;
        margin: 0 0.5rem;
    }

    .terms-container {
        padding: 2rem;
        margin: 0 0.5rem;
    }

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

    /* Ranking table responsive */
    .ranking-table-wrapper {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .ranking-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .ranking-table thead,
    .ranking-table tbody,
    .ranking-table th,
    .ranking-table td,
    .ranking-table tr {
        display: block;
    }

    .ranking-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .ranking-table tr {
        background: var(--bg-card);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        position: relative;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .ranking-table td {
        border: none;
        position: relative;
        padding: 0;
        text-align: left;
        white-space: normal;
    }

    .ranking-table td:first-child {
        flex-shrink: 0;
    }

    .ranking-table td:nth-child(2) {
        flex: 1;
        font-weight: 600;
        color: var(--text-light);
    }

    .ranking-table td:nth-child(3) {
        flex-shrink: 0;
        font-family: 'Courier New', monospace;
        background: rgba(168, 85, 247, 0.2);
        padding: 0.3rem 0.6rem;
        border-radius: var(--radius-sm);
        font-size: 0.8rem;
    }

    .ranking-table td:nth-child(4) {
        flex-shrink: 0;
        font-weight: 700;
        color: #e0aaff;
        font-size: 1.1rem;
    }

    .rank-badge {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .ranking-note {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .ranking-note p {
        font-size: 0.9rem;
    }

    /* Prize structure mobile fixes */
    .prize-structure {
        padding: 1rem;
        margin: 1rem 0;
    }

    .prize-list li {
        padding: 0.8rem 0;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .prize-position {
        font-size: 0.9rem;
        min-width: fit-content;
    }

    .prize-amount {
        font-size: 0.9rem;
        text-align: right;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .contest-hero h1 {
        font-size: 1.8rem;
    }

    .golden-opportunity {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .prize-pool {
        padding: 1.5rem;
    }

    .prize-pool h2 {
        font-size: 2rem;
    }

    .description-content h2 {
        font-size: 1.5rem;
    }

    .description-content > p {
        font-size: 0.9rem;
    }

    .highlight-item {
        padding: 1rem;
    }

    .highlight-item i {
        font-size: 2rem;
    }

    .highlight-item h3 {
        font-size: 1.1rem;
    }

    .contest-timeline {
        padding: 1.5rem;
    }

    .timeline-date {
        font-size: 1rem;
    }

    .timeline-event {
        font-size: 0.8rem;
    }

    .form-container {
        padding: 1.5rem;
        margin: 0 0.25rem;
    }

    .terms-container {
        padding: 1.5rem;
        margin: 0 0.25rem;
    }

    /* Ranking table responsive for small screens */
    .ranking-table-wrapper {
        padding: 0.8rem;
        margin: 0 0.25rem;
    }

    .ranking-table tr {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .ranking-table td:nth-child(2) {
        font-size: 0.9rem;
    }

    .ranking-table td:nth-child(3) {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .ranking-table td:nth-child(4) {
        font-size: 1rem;
    }

    .rank-badge {
        min-width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .ranking-note {
        padding: 0.8rem;
        margin: 0 0.25rem;
    }

    .ranking-note p {
        font-size: 0.8rem;
    }

    /* Prize structure mobile fixes for small screens */
    .prize-structure {
        padding: 0.8rem;
        margin: 0.8rem 0;
    }

    .prize-list li {
        padding: 0.6rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .prize-position {
        font-size: 0.85rem;
        width: 100%;
    }

    .prize-amount {
        font-size: 0.9rem;
        font-weight: 800;
        color: #ffd700;
        width: 100%;
        text-align: left;
        margin-left: 1rem;
    }

    /* FAQ mobile improvements */
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }

    .faq-answer-content {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}
