/* Main Layout */
main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
    background-color: #0a0a0a;
}

.container {
    width: 90%;
    /* Changed from max-width: 1200px */
    max-width: 90%;
    /* Added to ensure container doesn't get too wide on large screens */
    margin: 0 auto;
    padding: 2%;
    /* Changed from 20px to percentage */
    background-color: rgba(10, 10, 10, 0.95);
    border-radius: 15px;
    border: 1px solid rgba(255, 204, 0, 0.2);
}

/* Media queries for different screen sizes */
@media (min-width: 1400px) {

    .container,
    .onPosterText {
        width: 70%;
        max-width: 70%;
    }
}

@media (max-width: 768px) {

    .container,
    .onPosterText {
        width: 95%;
        max-width: 95%;
        padding: 4%;
    }

    .registration-mode{
        margin-left: -5px !important;
    }

    .infoAboutTournament{
        width: max-content !important;
    }

    .status-badge{
        padding: 1px 8px !important;
    }
}

@media (max-width: 480px) {

    .container,
    .onPosterText {
        width: 98%;
        max-width: 98%;
        padding: 5%;
    }
}


/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 20px 0;
}

/* Section Cards */
.section-card {
    background-color: rgba(10, 10, 10, 0.95);
    border: 1px solid #ffcc00;
    border-radius: 12px;
    height: 600px;
    overflow-y: scroll;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.15);
}

/* Headings */
h2,
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #ffcc00;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.section-title {
    font-size: 1.8rem;
}

/* Team Cards */
.teams-grid {
    display: grid;
    gap: 20px;
}

.team-card {
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ffcc00;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.team-card:hover::before {
    transform: scaleX(1);
}

.team-card.selected {
    background: rgba(255, 204, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
}

.team-name {
    color: #ffcc00;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
}

.team-id {
    color: #ffffff;
    opacity: 0.8;
    margin-bottom: 15px;
}

/* Team Members */
.team-members-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-member {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.team-member:hover {
    background: rgba(10, 10, 10, 0.9);
    border-color: #ffcc00;
    transform: translateY(-2px);
}

.team-member .member-details {
    color: #ffffff;
}

.team-member .member-details h4 {
    color: #ffcc00;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.team-member .member-details p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.team-leader {
    background: rgba(255, 204, 0, 0.1);
    border: 2px solid #ffcc00;
}

.leader-badge {
    background: #ffcc00;
    color: #0a0a0a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 10px;
    text-transform: uppercase;
}

/* Buttons */
.add-member-btn,
.view-members-btn,
.action-button {
    background: #ffcc00;
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-member-btn:hover,
.view-members-btn:hover,
.action-button:hover {
    background: #ffd633;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 204, 0, 0.2);
}

.action-button {
    width: 100%;
    margin: 10px 0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffcc00;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #ffcc00;
    border-radius: 6px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd633;
    outline: none;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

.form-group select {
    appearance: none;
    /* Removes default styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #ffcc00;
    border-radius: 6px;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* Style the dropdown arrow */
.form-group select::after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffcc00;
    pointer-events: none;
}

/* Style the dropdown options */
.form-group select option {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px;
}

/* Hover and focus styles */
.form-group select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd633;
    outline: none;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #0a0a0a;
    border: 2px solid #ffcc00;
    border-radius: 12px;
    padding: 30px;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.2);
    max-width: 500px;
    width: 90%;
}

/* Team Requests */
.request-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    color: #ffffff;
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.accept-btn,
.reject-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.accept-btn {
    background-color: #4CAF50;
    color: white;
}

.reject-btn {
    background-color: #f44336;
    color: white;
}

.accept-btn:hover,
.reject-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Profile Section */
.logout-btn {
    font-size: 25px;
    cursor: pointer;
    color: #ffcc00;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: #ffd633;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .team-member {
        margin: 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .team-card {
        padding: 15px;
    }

    .team-members-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Utility Classes */
.no-teams-message,
.no-members {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    font-style: italic;
}

.error-message {
    color: #f44336;
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 4px;
}

.registerForTournament {
    display: flex;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .team-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    main {
        padding: 10px 0;
    }

    .container {
        padding: 10px;
    }

    .uid {
        display: block !important;
    }

    h2 {
        font-size: 11px;
    }

    .centerButton {
        display: flex;
        justify-content: center;
    }

    #copyBtn {
        font-size: 10px !important;
    }

    #show-create-team {
        margin-top: 20px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .team-card {
        padding: 12px;
    }

    .team-member {
        padding: 12px;
    }

    .team-members-grid {
        grid-template-columns: 1fr;
    }

    .team-name {
        font-size: 1.2rem;
    }

    .leader-badge {
        padding: 3px 10px;
        font-size: 0.7em;
    }

    .add-member-btn,
    .view-members-btn,
    .register-team-confirm-btn{
        width: -webkit-fill-available;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 8px;
    }

    .section-card {
        padding: 15px;
        height: 350px;
    }

    .team-member {
        flex-direction: row;
    }

    .team-member .member-details {
        margin-bottom: 10px;
    }

    .request-actions {
        flex-direction: column;
    }

    .accept-btn,
    .reject-btn {
        width: 100%;
        margin: 5px 0;
    }

    .registerForTournament {
        flex-direction: column;
        align-items: center;
    }
}

.fa-trash {
    color: yellow;
    cursor: pointer;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    font-size: 30px;
    cursor: pointer;
    color: white;
}

.close-modal:hover {
    color: white;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

#add-member-modal .modal-content,
#view-members-modal .modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
}

.team-actions {
    width: 100%;
    padding: 20px;
}

#requests-list:empty {
    display: none;
}

.section-card:empty {
    display: none;
}

/* Styles for the separated sections */
.section-card {
    background-color: rgba(10, 10, 10, 0.95);
    border: 1px solid #ffcc00;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    height: fit-content;
}

.section-card .action-buttons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.section-card .action-buttons .cta-button {
    min-width: 200px;
}

#create-team-section {
    margin-top: 20px;
    padding: 20px;
    border-top: 1px solid rgba(255, 204, 0, 0.2);
}

@media (max-width: 768px) {
    .section-card .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-card .action-buttons .cta-button {
        width: 100%;
        margin: 10px 0;
    }
}

.uid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Space between text and button */
}

.your-id {
    margin: 0 !important;
}

#copyBtn {
    background-color: #ffcc00;
    color: #0a0a0a;
    border: none;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

#copyBtn:hover {
    background-color: #e6b800;
}

.top-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.bottom-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Modal styles */
.create-team-modal,
.tournament-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #0a0a0a;
    border: 2px solid #ffcc00;
    border-radius: 12px;
    padding: 30px;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    color: #ffcc00;
    cursor: pointer;
}

.tournament-content p {
    text-align: center;
}

.yourTeams {
    overflow-x: auto;
    height: 600px;
}

/* Registered Tournaments Section */
.tournament-card {
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 204, 0, 0.2);
}

.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.tournament-name {
    color: #ffcc00;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

.tournament-details {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.registration-mode {
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid #ffcc00;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #ffcc00;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status-pending {
    background-color: #ffcc00;
    color: #0a0a0a;
}

.status-confirmed {
    background-color: #1D9A6C;
    color: white;
}

.tournament-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.pay-now-btn {
    background: #ffcc00;
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pay-now-btn:hover {
    background: #ffd633;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 204, 0, 0.2);
}

@media (max-width: 768px) {
    .tournament-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tournament-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .pay-now-btn {
        width: 100%;
    }
}

#registered-tournaments-list:empty::after {
    content: 'No registered tournaments found.';
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    font-style: italic;
}

.infoAboutTournament {
    display: flex;
    justify-content: space-between;
    width: -webkit-fill-available;
    align-items: baseline;
}

.tournament-actions {
    padding: 10px;
    display: flex;
    justify-content: center;
    text-align: right;
}

.pay-button {
    background-color: red;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pay-button:hover {
    background-color: red;
}