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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('/static/images/pozadi.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8), 0 0 10px rgba(255,255,255,0.5);
}

.screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.screen.hidden {
    display: none;
}

/* Box styling - boxy components */
.box {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    margin: 15px;
}

.login-box {
    min-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 20px;
    color: #667eea;
}

.login-box input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.login-box input:focus {
    border-color: #667eea;
}

.version-info {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85em;
    color: #999;
    opacity: 0.7;
}

/* Lobby Browser */
.lobby-browser-box {
    min-width: 500px;
    max-width: 600px;
}

.lobby-browser-box h2 {
    margin-bottom: 20px;
    color: #667eea;
    text-align: center;
}

.lobbies-list {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.no-lobbies {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-style: italic;
}

.lobby-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.2s;
}

.lobby-item:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.lobby-info {
    flex: 1;
    min-width: 0;
}

.lobby-name-text {
    font-weight: bold;
    font-size: 1.05em;
    color: #333;
    margin-bottom: 2px;
}

.lobby-details {
    font-size: 0.85em;
    color: #888;
}

.lobby-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lobby-join-btn {
    width: auto !important;
    padding: 8px 18px !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.btn-delete-lobby {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #dc3545;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-delete-lobby:hover {
    background: #c82333;
}

.create-lobby-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.create-lobby-form input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.create-lobby-form input:focus {
    border-color: #667eea;
}

.create-lobby-form button {
    width: auto !important;
    white-space: nowrap;
}

.lobby-box {
    min-width: 500px;
}

.lobby-box h2 {
    margin-bottom: 20px;
    color: #667eea;
    text-align: center;
}

.players-list {
    margin-bottom: 20px;
}

.player-item {
    padding: 12px;
    margin: 8px 0;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-item.ready {
    background: #d4edda;
    border-color: #28a745;
}

.player-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-item .player-name {
    font-weight: bold;
}

.player-item .ready-status {
    color: #28a745;
    font-weight: bold;
    margin-left: auto;
}

.remove-player-btn {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    font-size: 0.9em !important;
    margin: 0 !important;
    margin-right: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

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

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.error-message {
    color: #dc3545;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 6px;
    display: none;
}

.error-message.show {
    display: block;
}

.status-message {
    margin-top: 15px;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    color: #667eea;
}

/* Game Screen */
.game-container {
    width: 100%;
}

.deck-players-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.deck-info-box {
    flex-shrink: 0;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin: 0 !important;
    border: 3px solid #ddd !important;
    box-shadow: none !important;
    box-sizing: border-box;
    min-height: 120px !important;
    height: auto;
}

.deck-info-box h3 {
    margin-bottom: 10px;
    color: #667eea;
    font-size: 1.1em;
    margin-top: 0;
}

.deck-size {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.players-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    flex: 1;
}

.player-card {
    background: white;
    border-radius: 12px;
    padding: 15px !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    border: 3px solid #ddd !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 120px !important;
    height: auto;
}

.player-card.current {
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #e8f0ff 0%, #d6e4ff 100%);
    border-width: 4px;
    font-weight: bold;
}

.player-card.dead {
    opacity: 0.5;
    background: #f8d7da;
}

.player-card .player-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.player-card .hand-size {
    color: #666;
    margin-top: 5px;
}

.hand-box {
    margin-bottom: 0;
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 150;
    margin-top: 0;
}

.hand-box h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.hand {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.card {
    width: 120px;
    height: 170px;
    background: white;
    border: 3px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Barvy pozadí podle typu karty */
.card-type-exploding_kitten {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-color: #d63031;
    color: white;
}

.card-type-defuse {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    border-color: #00a085;
    color: white;
}

.card-type-skip {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-color: #0984e3;
    color: white;
}

.card-type-attack {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    border-color: #e84393;
    color: white;
}

.card-type-shuffle {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    border-color: #e17055;
    color: white;
}

.card-type-see_future {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    border-color: #6c5ce7;
    color: white;
}

.card-type-favor {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-color: #fdcb6e;
    color: #2d3436;
}

.card-type-nope {
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
    border-color: #b2bec3;
    color: #2d3436;
}

.card-type-reverse {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    border-color: #d63031;
    color: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.card:hover .card-description {
    display: block;
    opacity: 1;
}

.card:active {
    transform: translateY(-2px);
}

.card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card .card-title {
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
    max-width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 8px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
}

/* Skryjeme název karty, pokud má karta obrázek (název je už na obrázku) */
.card.has-image .card-title {
    display: none;
}

/* Barva textu podle typu karty */
.card-type-exploding_kitten .card-title,
.card-type-defuse .card-title,
.card-type-skip .card-title,
.card-type-attack .card-title,
.card-type-shuffle .card-title,
.card-type-see_future .card-title {
    color: white;
}

.card-type-favor .card-title,
.card-type-nope .card-title,
.card-type-reverse .card-title {
    color: #2d3436;
}

.card .card-description {
    font-size: 0.7em;
    color: #666;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    max-width: 100%;
    /* Skryjeme popis, zobrazíme při hover (desktop) nebo tap (mobil) */
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.98);
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    z-index: 20;
    max-height: 80px;
    overflow-y: auto;
}

.card.show-description .card-description {
    display: block;
    opacity: 1;
}

/* Obrázek karty je nyní pozadím celé karty, takže .card-image už není potřeba */

.actions-box {
    text-align: center;
    display: flex;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 200;
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 0;
}

.actions-box button {
    flex: 1;
}

.actions-box button.hidden {
    display: none;
}

.messages-box {
    margin-bottom: 20px;
}

.messages-box h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.messages {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    display: flex;
    flex-direction: column; /* Normální směr - nejnovější zprávy budou na začátku */
    scroll-behavior: auto; /* Bez animace */
    align-items: stretch;
}

.message {
    padding: 10px;
    margin: 3px 0;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.message-time {
    font-size: 0.75em;
    color: #999;
    white-space: nowrap;
}

.message-text {
    flex: 1;
}

.message.error {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.message.success {
    background: #d4edda;
    border-left-color: #28a745;
}

.message.defused {
    background: #d1ecf1;
    border-left-color: #0dcaf0;
    color: #055160;
}

.message.died {
    background: #e7d4c0;
    border-left-color: #8b4513;
    color: #5a3a1f;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.modal-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Pro view-deck-modal použijeme grid s 8 sloupci */
#view-deck-modal .modal-content {
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
}

#view-deck-modal .modal-cards {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    justify-items: center;
}

/* Karty v modalu používají stejnou třídu .card jako karty v ruce */
.modal-cards .card {
    width: 100px;
    height: 140px;
    position: relative;
}

/* Pro view-deck-modal zmenšíme karty, aby se vešly */
#view-deck-modal .modal-cards .card {
    width: 80px;
    height: 112px;
}

/* Favor Modal */
.favor-players-list {
    margin-bottom: 20px;
}

.favor-player-item {
    padding: 15px;
    margin: 10px 0;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favor-player-item:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.favor-player-item:active {
    transform: scale(0.98);
}

.favor-player-name {
    font-weight: bold;
    font-size: 1.1em;
}

.favor-player-hand {
    color: #666;
    font-size: 0.9em;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    .screen {
        min-height: auto;
        padding: 10px 0;
    }
    
    .box {
        padding: 15px;
        margin: 10px;
        border-radius: 10px;
    }
    
    .login-box {
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .lobby-box {
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }

    .lobby-browser-box {
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }

    .create-lobby-form {
        flex-direction: column;
    }

    .create-lobby-form button {
        width: 100% !important;
    }
    
    .login-box input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 44px; /* Touch-friendly size */
    }
    
    .player-item {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .game-container {
        width: 100%;
    }
    
    .deck-players-row {
        flex-direction: row !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
        align-items: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .deck-info-box {
        width: 90px !important;
        min-width: 90px !important;
        max-width: 90px !important;
        flex-shrink: 0 !important;
        padding: 6px !important;
        min-height: 60px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .deck-info-box h3 {
        font-size: 0.7em !important;
        margin-bottom: 4px !important;
        margin-right: 0 !important;
        line-height: 1.2 !important;
    }
    
    .deck-size {
        font-size: 0.75em !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }
    
    .players-container {
        gap: 6px !important;
        margin-bottom: 0 !important;
        width: auto !important;
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 4px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .player-card {
        min-width: 90px !important;
        max-width: 90px !important;
        width: 90px !important;
        flex: 0 0 90px !important;
        padding: 6px !important;
        font-size: 0.75em !important;
        min-height: 60px !important;
        height: auto !important;
    }
    
    .player-card .player-name {
        font-size: 0.75em !important;
        margin-bottom: 2px !important;
        line-height: 1.2 !important;
    }
    
    .player-card .hand-size {
        font-size: 0.7em !important;
        margin-top: 2px !important;
    }
    
    .hand-box {
        margin-bottom: 15px;
    }
    
    .hand-box h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .hand {
        gap: 8px;
    }
    
    .card {
        width: 90px;
        height: 130px;
        padding: 8px;
    }
    
    .card .card-title {
        font-size: 0.8em;
        line-height: 1.1;
        padding: 0 2px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        flex-shrink: 0;
    }
    
    .card .card-description {
        font-size: 0.65em;
        line-height: 1.2;
        padding: 6px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        display: none;
        max-height: 70px;
    }
    
    .card.show-description .card-description {
        display: block;
        opacity: 1;
    }
    
    .card .card-image {
        height: 50px;
        font-size: 1.2em;
        flex-shrink: 0;
    }
    
    .actions-box {
        flex-direction: column;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .actions-box button {
        width: 100%;
        min-height: 44px;
    }
    
    .messages-box {
        margin-bottom: 15px;
    }
    
    .messages-box h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .messages {
        max-height: 150px;
        font-size: 0.9em;
    }
    
    .hand-box {
        position: relative;
        margin-bottom: 0;
    }
    
    .message {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .modal-content h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .modal-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    #view-deck-modal .modal-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-cards .card {
        width: 80px;
        height: 110px;
    }
    
    .favor-player-item {
        padding: 12px;
        font-size: 0.9em;
    }
    
    .favor-player-name {
        font-size: 1em;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    header h1 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }
    
    .box {
        padding: 12px;
        margin: 8px;
    }
    
    .card {
        width: 75px;
        height: 110px;
        padding: 5px;
    }
    
    .card .card-title {
        font-size: 0.75em;
        line-height: 1.1;
        padding: 0 1px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        flex-shrink: 0;
    }
    
    .card .card-description {
        font-size: 0.6em;
        line-height: 1.15;
        padding: 5px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        display: none;
        max-height: 60px;
    }
    
    .card.show-description .card-description {
        display: block;
        opacity: 1;
    }
    
    .card .card-image {
        height: 50px;
        font-size: 1.2em;
    }
    
    .player-card {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 8px;
    }
    
    .players-container {
        flex-direction: column;
    }
    
    .hand {
        gap: 6px;
    }
    
    .modal-content {
        padding: 15px;
        margin: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }
    
    .card:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
    
/* Explosion Effect */
.explosion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.9) 0%, rgba(255, 140, 0, 0.8) 30%, rgba(255, 0, 0, 0.6) 60%, transparent 100%);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-in;
    animation: explosionFlash 1.5s ease-out;
}

.explosion-overlay.active {
    opacity: 1;
}

@keyframes explosionFlash {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1.2);
    }
    40% {
        opacity: 0.8;
        transform: scale(1);
    }
    60% {
        opacity: 0.6;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* Shake effect pro celou obrazovku */
body.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px) rotate(-1deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px) rotate(1deg);
    }
}

    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* Prevent text selection on cards for better mobile UX */
.card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Safe area for iPhone X and newer */
@supports (padding: max(0px)) {
    body {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    @media screen and (max-width: 768px) {
        body {
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
            padding-top: max(10px, env(safe-area-inset-top));
            padding-bottom: max(10px, env(safe-area-inset-bottom));
        }
    }
}

