/* Základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Kontejner */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Mobilní layout */
.container-mobile {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

header .user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header .user-info span {
    color: #666;
    font-size: 0.9rem;
}

/* Tlačítka */
button, .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active, .btn:active {
    transform: translateY(0);
}

button.secondary {
    background: #e0e0e0;
    color: #333;
}

button.secondary:hover {
    background: #d0d0d0;
}

button.danger {
    background: #ff6b6b;
}

button.danger:hover {
    background: #ff5252;
}

button.success {
    background: #51cf66;
}

button.success:hover {
    background: #40c057;
}

/* Formulář */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Karty */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.card p {
    color: #666;
    line-height: 1.6;
}

/* Modální okno */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* Tabulka */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background: #f9f9f9;
}

/* Skóre vstup - mobilní optimalizace */
.score-input-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.score-input-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.score-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.score-input-group.full {
    grid-template-columns: 1fr;
}

.score-input-group input, .score-input-group select {
    padding: 15px;
    font-size: 1rem;
}

.large-number-input {
    font-size: 2.5rem;
    text-align: center;
    font-weight: bold;
    padding: 20px;
}

.large-number-input input {
    font-size: inherit;
    font-weight: inherit;
}

/* Grafy */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.chart-container h3 {
    color: #667eea;
    margin-bottom: 15px;
}

canvas {
    max-width: 100%;
    height: auto;
}

/* Zprávy */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

.alert.show {
    display: block;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-col {
    flex-direction: column;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

/* Responzivita */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .score-input-group {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th, table td {
        padding: 8px;
    }
}

/* Statusy */
.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.member {
    background: #d4edda;
    color: #155724;
}

.status.invited {
    background: #fff3cd;
    color: #856404;
}

.status.removed {
    background: #f8d7da;
    color: #721c24;
}

/* Statistiky */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-box h4 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.stat-box .value {
    color: #667eea;
    font-size: 2rem;
    font-weight: bold;
}

/* Navigace */
nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

nav button, nav a {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

@media (max-width: 600px) {
    nav button, nav a {
        flex: 0 1 calc(33.333% - 8px);
    }
}

/* Skryté prvky */
.hidden {
    display: none !important;
}

.show {
    display: block !important;
}

/* Animace */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
