/* Custom styles for Tournament App using Skeleton CSS */

/* Navigation */
.navbar {
    background: #1EAEDB;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand i {
    font-size: 2rem;
    margin-right: 1rem;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    text-align: right;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #f0f0f0;
}

.nav-links i {
    margin-right: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    border: 1px solid;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 0.75rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

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

th {
    background-color: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #e1e1e1;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid #e1e1e1;
}

.team-row:hover {
    background-color: #f8f9fa;
}

/* Position highlighting */
.position-1 { background-color: #d4edda; }
.position-2 { background-color: #fff3cd; }
.position-3 { background-color: #e2d9f3; }

/* Match cards */
.match-card {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
}

.knockout-match {
    border-left: 4px solid #1EAEDB;
}

.group-match {
    border-left: 4px solid #33C3F0;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.match-stage {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #666;
}

.match-date {
    font-size: 0.75rem;
    color: #999;
}

.match-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-score {
    text-align: center;
    flex: 1;
}

.team-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.score {
    font-size: 2rem;
    font-weight: bold;
    color: #1EAEDB;
}

.vs {
    color: #999;
    margin: 0 1rem;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #666;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #177705;
    box-shadow: 0 0 0 2px rgba(30, 174, 219, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #155724;
    color: white;
}

.btn-primary:hover {
    background-color: #177705;
}

.btn-success {
    background-color: #33C3F0;
    color: white;
}

.btn-success:hover {
    background-color: #1EAEDB;
}

.btn-warning {
    background-color: #F5A623;
    color: white;
}

.btn-warning:hover {
    background-color: #F08A00;
}

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

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

/* Tournament info section */
.tournament-info {
    background: linear-gradient(135deg, #1EAEDB 0%, #33C3F0 100%);
    color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tournament-info h2 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.tournament-info i {
    margin-right: 0.75rem;
}

.tournament-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.tournament-stat {
    text-align: center;
}

.tournament-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.tournament-stat-label {
    opacity: 0.9;
    font-size: 0.875rem;
}

.tournament-rules {
    opacity: 0.9;
    line-height: 1.6;
}

.tournament-rules p {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        text-align: left;
        margin-top: 1rem;
    }
    
    .nav-links a {
        display: block;
        margin: 0.5rem 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .tournament-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .match-score {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs {
        margin: 0;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1EAEDB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.notification-success {
    background-color: #33C3F0;
}

.notification-error {
    background-color: #D0021B;
}

.notification-info {
    background-color: #1EAEDB;
}

/* Print buttons */
.print-button {
    font-size: 1.2rem; 
    padding: 1rem 2rem; 
    display: inline-block; 
    color: white !important; 
    text-decoration: none; 
    border-radius: 4px; 
    border: none; 
    cursor: pointer; 
    transition: background-color 0.3s;
    background-color: #155724 !important;
}

.print-button:hover {
    background-color: #177705 !important;
} 