body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.description {
    color: #000000;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.controls {
    margin: 30px 0;
}

button {
    padding: 15px 40px;
    font-size: 1.2em;
    cursor: pointer;
    margin: 10px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(-1px);
}

.cards-container {
    position: relative;
    width: 100%;
    height: 450px;
    margin: 40px auto;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
    overflow: hidden;
}

.card {
    position: absolute;
    width: 100px;
    height: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    user-select: none;
    transform-origin: center center;
}

/* Обратная сторона (рубашка карты Таро) */
.card.flipped {
    background: #8b4513 url('tarot/back.webp') center/cover no-repeat;
    border: 3px solid #d4af37;
}

.card-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5dc;
    border-radius: 6px;
}

.card-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.card.flipped .card-image-container {
    display: none;
}

.card.selected .card-image-container {
    display: flex;
}

.card.reversed .card-image {
    transform: rotate(180deg);
}

.card.selected {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.8);
    z-index: 10;
}

.result {
    margin-top: 40px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
}

.card-interpretation {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.card-interpretation h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-interpretation p {
    color: #000000;
    line-height: 1.6;
    margin: 0;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.credits {
    text-align: left;
}

.credits p {
    margin: 5px 0;
    color: #6c757d;
}

.author-link {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.developer a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.developer a:hover {
    color: #667eea;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .cards-container {
        height: 400px;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .credits {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cards-container {
        height: 350px;
    }
    
    button {
        padding: 12px 30px;
        font-size: 1em;
    }
}

@media (max-height: 400px) and (orientation: landscape) {
    .cards-container {
        height: 180px;
    }
}