/* Main Styles for Ludo Tournament Championship */


/* Global Styles */
• {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}


.main-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}


/* Floating Elements Animation */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}


.floating-element {
    position: absolute;
    top: -50px;
    font-size: 24px;
    opacity: 0.3;
    animation: float linear infinite;
    transform: translateY(0);
}


@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(calc(100vh + 100px)) rotate(360deg);
    }
}


/* Authentication Screens */
.auth-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}


.auth-screen.active {
    display: flex;
}


.auth-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #4a6fa5;
}


.auth-form {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}


.form-group {
    margin-bottom: 20px;
    text-align: left;
}


.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}


.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}


.form-group input:focus {
    border-color: #4a6fa5;
    outline: none;
}


.auth-btn {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}


.auth-btn:hover {
    background-color: #3a5a8c;
}


.auth-link {
    color: #4a6fa5;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}


/* Main App */
#main-app {
    display: none;
    min-height: 100vh;
    background-color: #f0f2f5;
}


.header {
    background-color: #4a6fa5;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}


.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}


.user-balance {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}


.logout-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}


.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}


.nav-tabs {
    display: flex;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}


.nav-tab {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    border-bottom: 3px solid transparent;
}


.nav-tab.active {
    color: #4a6fa5;
    border-bottom-color: #4a6fa5;
}


.tab-content {
    display: none;
    padding: 20px;
}


.tab-content.active {
    display: block;
}


/* Game Board */
#game-tab {
    display: none;
    padding: 10px;
}


#game-tab.active {
    display: block;
}


.game-board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0 auto;
    max-width: 800px;
}


.game-board {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1; /* Maintain square aspect ratio */
    background-color: #f5f5f5;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    gap: 1px;
}


.cell {
    background-color: #fff;
    border: 1px solid #eee;
    position: relative;
}


.game-status {
    width: 100%;
    max-width: 500px;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}


.game-notification {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    color: #4a6fa5;
}


.game-info {
    display: flex;
    justify-content: space-between;
}


.prize-pool, .current-player {
    font-weight: 600;
}


.game-controls {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}


.game-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}


.game-btn:not(.danger) {
    background-color: #4a6fa5;
    color: white;
}


.game-btn:not(.danger):hover {
    background-color: #3a5a8c;
}


.game-btn.danger {
    background-color: #e74c3c;
    color: white;
}


.game-btn.danger:hover {
    background-color: #c0392b;
}


.game-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


/* Tournament List */
.tournament-container {
    padding: 10px;
}


.tournament-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}


.tournament-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}


.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


.tournament-header {
    background-color: #4a6fa5;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.tournament-name {
    font-size: 1.2rem;
    margin: 0;
}


.tournament-prize {
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
}


.tournament-details {
    padding: 15px;
}


.tournament-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}


.info-item {
    text-align: center;
}


.info-label {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 5px;
}


.info-value {
    font-weight: 600;
    color: #333;
}


.tournament-join {
    width: 100%;
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}


.tournament-join:hover {
    background-color: #3a5a8c;
}


/* Waiting Room */
#waiting-room {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    color: white;
}


.waiting-container {
    max-width: 600px;
    margin: 50px auto;
    background-color: #2c3e50;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}


.waiting-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}


.waiting-timer {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #f39c12;
}


.waiting-players {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}


.waiting-player {
    text-align: center;
}


.player-avatar {
    width: 60px;
    height: 60px;
    background-color: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 10px;
}


.player-disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}


.waiting-actions {
    margin-top: 20px;
}


.waiting-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}


.waiting-btn:hover {
    background-color: #c0392b;
}


/* Leaderboard */
.leaderboard-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}


.leaderboard-title {
    text-align: center;
    margin-bottom: 20px;
    color: #4a6fa5;
}


.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}


.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}


.leaderboard-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #555;
}


.leaderboard-table tr:last-child td {
    border-bottom: none;
}


/* Profile */
.profile-container {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}


.profile-header {
    background-color: #4a6fa5;
    color: white;
    padding: 30px 20px;
    display: flex;
    align-items: center;
}


.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-right: 20px;
}


.profile-info {
    flex: 1;
}


.profile-name {
    font-size: 1.5rem;
    margin: 0 0 5px;
}


.profile-meta {
    opacity: 0.8;
    font-size: 0.9rem;
}


.profile-stats {
    display: flex;
    margin-top: 15px;
}


.stat {
    flex: 1;
    text-align: center;
    padding: 0 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}


.stat:last-child {
    border-right: none;
}


.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}


.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}


.profile-content {
    padding: 20px;
}


.profile-section {
    margin-bottom: 30px;
}


.profile-section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #4a6fa5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.profile-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}


.profile-btn {
    flex: 1;
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}


.profile-btn:hover {
    background-color: #3a5a8c;
}


.transactions-table {
    width: 100%;
    border-collapse: collapse;
}


.transactions-table th,
.transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}


.transactions-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #555;
}


.transactions-table tr:last-child td {
    border-bottom: none;
}


.approved {
    color: #27ae60;
}


.pending {
    color: #f39c12;
}


.rejected {
    color: #e74c3c;
}


/* Game History */
.history-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}


.history-title {
    text-align: center;
    margin-bottom: 20px;
    color: #4a6fa5;
}


.history-table {
    width: 100%;
    border-collapse: collapse;
}


.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}


.history-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #555;
}


.history-table tr:last-child td {
    border-bottom: none;
}


.win {
    color: #27ae60;
    font-weight: 600;
}


.loss {
    color: #e74c3c;
    font-weight: 600;
}


.left {
    color: #f39c12;
    font-weight: 600;
}


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


.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}


.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}


.modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #4a6fa5;
}


.payment-info {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}


.payment-info p {
    margin-bottom: 10px;
}


.payment-info strong {
    color: #4a6fa5;
}


/* Admin Panel */
.admin-panel {
    display: none;
    min-height: 100vh;
    background-color: #f0f2f5;
}


.admin-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.admin-title {
    font-size: 1.8rem;
    margin: 0;
}


.admin-logout {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}


.admin-logout:hover {
    background-color: white;
    color: #2c3e50;
}


.admin-tabs {
    display: flex;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}


.admin-tab {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}


.admin-tab.active {
    color: #2c3e50;
    border-bottom-color: #2c3e50;
}


.admin-tab-content {
    display: none;
    padding: 20px;
}


.admin-tab-content.active {
    display: block;
}


.admin-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}


.admin-card-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}


.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}


.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}


.admin-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #555;
}


.admin-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}


.admin-btn:hover {
    background-color: #1a2530;
}


.admin-btn.small {
    padding: 5px 10px;
    font-size: 0.9rem;
}


.admin-btn.danger {
    background-color: #e74c3c;
}


.admin-btn.danger:hover {
    background-color: #c0392b;
}


.status-active, .status-approved {
    color: #27ae60;
    font-weight: 600;
}


.status-inactive, .status-rejected {
    color: #e74c3c;
    font-weight: 600;
}


.status-pending {
    color: #f39c12;
    font-weight: 600;
}


.admin-form {
    display: grid;
    gap: 15px;
}


/* Notification */
#notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}


#notification.show {
    opacity: 1;
}


/* Utility Classes */
.loading {
    text-align: center;
    padding: 20px;
    color: #777;
}


.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
}


.no-data {
    text-align: center;
    padding: 20px;
    color: #777;
}


/* Responsive Styles */
@media (max-width: 768px) {
    .auth-form {
        padding: 20px;
    }


.nav-tab {
    padding: 10px;
    font-size: 0.9rem;
}

.admin-tabs {
    flex-wrap: wrap;
}

.admin-tab {
    flex: 1;
    text-align: center;
    min-width: 33.333%;
}

.tournament-info {
    grid-template-columns: 1fr;
}

.profile-header {
    flex-direction: column;
    text-align: center;
}

.profile-avatar {
    margin-right: 0;
    margin-bottom: 15px;
}

.admin-table {
    font-size: 0.9rem;
}

}