/* Dobble Simulator - Cognito Theme */
/* ================================ */

.dobble-simulator * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dobble-simulator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1A365D 0%, #2C5282 100%);
    padding: 20px;
    min-height: 100vh;
}

.dobble-simulator .dg-header {
    text-align: center;
    margin-bottom: 20px;
}

.dobble-simulator .dg-logo {
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

.dobble-simulator .dg-logo:hover {
    transform: scale(1.05);
}

.dobble-simulator .dg-footer {
    text-align: center;
    padding: 15px 20px;
    margin-top: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.dobble-simulator .dg-footer a {
    color: #F6C743;
    text-decoration: none;
}

.dobble-simulator .dg-footer a:hover {
    text-decoration: underline;
}

.dobble-simulator .container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.dobble-simulator h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.dobble-simulator .info-box {
    background: linear-gradient(135deg, #1A365D 0%, #2C5282 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.dobble-simulator .info-box h3 {
    margin-bottom: 10px;
}

.dobble-simulator .info-box ul {
    margin-left: 20px;
}

.dobble-simulator .controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dobble-simulator button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.dobble-simulator button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dobble-simulator .btn-primary {
    background: #1A365D;
    color: white;
}

.dobble-simulator .btn-secondary {
    background: #F6C743;
    color: #1A365D;
}

.dobble-simulator .view-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dobble-simulator .view-btn {
    padding: 10px 20px;
    border: 2px solid #1A365D;
    background: white;
    color: #1A365D;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.dobble-simulator .view-btn.active {
    background: #1A365D;
    color: white;
}

.dobble-simulator .rovina-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.dobble-simulator .rovina-info {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #1A365D;
}

.dobble-simulator .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.dobble-simulator .card {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.dobble-simulator .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.dobble-simulator .card.highlight {
    border-color: #1A365D;
    background: #edf2f7;
}

.dobble-simulator .card.layer-highlight {
    border-color: #F6C743;
    border-width: 4px;
    background: #FFFBEB;
    box-shadow: 0 4px 12px rgba(246, 199, 67, 0.3);
}

.dobble-simulator .card-header {
    font-weight: bold;
    color: #1A365D;
    margin-bottom: 10px;
    text-align: center;
    font-size: 14px;
}

.dobble-simulator .card-symbols {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.dobble-simulator .symbol {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1A365D;
    color: #F6C743;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.dobble-simulator .symbol.empty {
    background: #e2e8f0;
    color: transparent;
}

.dobble-simulator .symbol.highlight {
    background: #F6C743;
    color: #1A365D;
    animation: dobble-pulse 1s infinite;
}

@keyframes dobble-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.dobble-simulator .results {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.dobble-simulator .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dobble-simulator .stat-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.dobble-simulator .stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #1A365D;
}

.dobble-simulator .stat-label {
    color: #718096;
    margin-top: 5px;
}

.dobble-simulator .success {
    color: #B7791F;
}

.dobble-simulator .error {
    color: #f56565;
}

.dobble-simulator .distribution {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.dobble-simulator .dist-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    min-width: 100px;
}

.dobble-simulator .dist-item.correct {
    border: 3px solid #F6C743;
}

.dobble-simulator .algorithm-box {
    background: #f0fff4;
    border: 2px solid #F6C743;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.dobble-simulator .algorithm-box h3 {
    color: #1A365D;
    margin-bottom: 15px;
}

.dobble-simulator .algorithm-box code {
    background: #e6fffa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Strukturované rozložení karet */
.dobble-simulator .structured-view {
    margin-bottom: 30px;
}

.dobble-simulator .structure-section {
    margin-bottom: 25px;
}

.dobble-simulator .section-label {
    color: #1A365D;
    font-size: 14px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-radius: 8px;
    border-left: 4px solid #F6C743;
}

/* Karta 0 - Přímka v nekonečnu */
.dobble-simulator .card-infinity {
    display: flex;
    justify-content: center;
}

.dobble-simulator .card-infinity .card {
    min-width: 200px;
    border-color: #1A365D;
    border-width: 3px;
}

.dobble-simulator .card-infinity .card.layer-highlight {
    border-color: #F6C743;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

/* Karty 1-7 - Vertikální přímky */
.dobble-simulator .cards-vertical {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
}

/* Karty 8-56 - Afinní přímky 7x7 */
.dobble-simulator .affine-labels {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 10px;
    max-width: 940px;
    margin: 0 auto 5px auto;
}

.dobble-simulator .affine-corner {
    /* prázdný roh */
}

.dobble-simulator .affine-header {
    text-align: center;
    font-weight: bold;
    color: #1A365D;
    font-size: 12px;
    padding: 5px;
}

.dobble-simulator .cards-affine {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 10px;
    max-width: 940px;
    margin: 0 auto;
}

.dobble-simulator .affine-row-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #1A365D;
    font-size: 12px;
}

/* Zvýraznění řádků (stejná směrnice = rovnoběžky) */
.dobble-simulator .cards-affine .card[data-slope="0"] { border-left: 3px solid #e53e3e; }
.dobble-simulator .cards-affine .card[data-slope="1"] { border-left: 3px solid #dd6b20; }
.dobble-simulator .cards-affine .card[data-slope="2"] { border-left: 3px solid #d69e2e; }
.dobble-simulator .cards-affine .card[data-slope="3"] { border-left: 3px solid #38a169; }
.dobble-simulator .cards-affine .card[data-slope="4"] { border-left: 3px solid #3182ce; }
.dobble-simulator .cards-affine .card[data-slope="5"] { border-left: 3px solid #805ad5; }
.dobble-simulator .cards-affine .card[data-slope="6"] { border-left: 3px solid #d53f8c; }

/* Responzivní design pro tablety */
@media (max-width: 960px) {
    .dobble-simulator .cards-vertical {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
    
    .dobble-simulator .affine-labels {
        display: none;
    }
    
    .dobble-simulator .cards-affine {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
    
    .dobble-simulator .cards-affine .affine-row-label {
        display: none;
    }
    
    .dobble-simulator .card {
        min-height: 120px;
        padding: 10px;
    }
    
    .dobble-simulator .card-header {
        font-size: 12px;
    }
    
    .dobble-simulator .symbol {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
}

/* Responzivní design pro mobily */
@media (max-width: 600px) {
    .dobble-simulator {
        padding: 10px;
    }
    
    .dobble-simulator .container {
        padding: 15px;
    }
    
    .dobble-simulator h1 {
        font-size: 1.5em;
    }
    
    .dobble-simulator .info-box,
    .dobble-simulator .algorithm-box {
        padding: 15px;
        font-size: 14px;
    }
    
    .dobble-simulator .info-box ul {
        margin-left: 15px;
    }
    
    .dobble-simulator .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .dobble-simulator .controls button {
        width: 100%;
    }
    
    .dobble-simulator .view-selector {
        flex-direction: column;
        gap: 5px;
    }
    
    .dobble-simulator .view-btn {
        width: 100%;
        text-align: center;
    }
    
    .dobble-simulator .rovina-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .dobble-simulator .rovina-controls button {
        width: 100%;
    }
    
    .dobble-simulator .section-label {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .dobble-simulator .cards-vertical {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .dobble-simulator .cards-affine {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .dobble-simulator .card {
        min-height: 100px;
        padding: 8px;
        border-radius: 8px;
    }
    
    .dobble-simulator .card-header {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .dobble-simulator .card-symbols {
        gap: 3px;
    }
    
    .dobble-simulator .symbol {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .dobble-simulator .card-infinity .card {
        min-width: auto;
        width: 100%;
        max-width: 250px;
    }
    
    .dobble-simulator .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dobble-simulator .stat-number {
        font-size: 1.8em;
    }
    
    .dobble-simulator .distribution {
        gap: 5px;
    }
    
    .dobble-simulator .dist-item {
        padding: 10px;
        min-width: 70px;
    }
}

/* Extra malé obrazovky */
@media (max-width: 400px) {
    .dobble-simulator .cards-vertical,
    .dobble-simulator .cards-affine {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .dobble-simulator .symbol {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
    
    .dobble-simulator .card {
        min-height: 90px;
        padding: 6px;
    }
}
