/* Screen layouts and transitions */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Welcome Screen */
#welcomeScreen {
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.welcome-title {
    font-size: 2.5rem;
    color: #ffd700;
    text-align: center;
    margin-bottom: 50px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    font-weight: 300;
    letter-spacing: 3px;
    animation: fadeInDown 0.8s ease;
}

.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 320px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.mode-card {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2) 0%, rgba(156, 39, 176, 0.2) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 15px 40px rgba(233, 30, 99, 0.3);
}

.mode-card:active {
    transform: scale(0.98);
}

.mode-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.mode-card-title {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.mode-card-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Package Selection Screen */
#packageScreen {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.screen-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.screen-header-title {
    flex: 1;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    padding-right: 30px;
}

.package-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 20px;
}

.package-title {
    color: #ffd700;
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 300;
}

.package-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.package-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.package-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.5);
}

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

.package-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.package-card-icon {
    font-size: 2.5rem;
}

.package-card-info {
    flex: 1;
}

.package-card-name {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: 500;
}

.package-card-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 3px;
}

.package-card-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.package-card-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e91e63, #ffd700);
    transition: width 0.3s ease;
}

.package-card-actions {
    display: flex;
    gap: 10px;
}

.package-locked-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    text-align: center;
}

/* Couple Setup Screen */
#coupleSetupScreen {
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.setup-title {
    color: #ffd700;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 300;
}

.setup-question {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 30px;
}

.player-selection {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.player-btn {
    width: 100px;
    height: 120px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.player-btn:hover {
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-3px);
}

.player-btn.selected {
    border-color: #e91e63;
    background: rgba(233, 30, 99, 0.2);
    box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
}

.player-btn-icon {
    font-size: 2.5rem;
}

.player-btn-label {
    color: white;
    font-size: 1rem;
}

.random-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 10px;
    margin-bottom: 40px;
    transition: color 0.2s ease;
}

.random-btn:hover {
    color: #ffd700;
}

.setup-back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    color: #ffd700;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* Solo Play Screen */
#soloScreen {
    background: #1a1a2e;
}

.solo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
}

.solo-header .back-btn {
    padding: 5px 10px;
}

.solo-set-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.solo-set-info:hover {
    background: rgba(255, 215, 0, 0.1);
}

.solo-set-icon {
    font-size: 1.5rem;
}

.solo-set-name {
    color: #ffd700;
    font-size: 1rem;
}

.solo-progress {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.solo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Couple Play Screen */
#couplePlayScreen {
    background: #1a1a2e;
}

.couple-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
}

.couple-header .back-btn {
    padding: 5px 10px;
}

.couple-set-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.couple-set-icon {
    font-size: 1.3rem;
}

.couple-set-name {
    color: #ffd700;
    font-size: 0.9rem;
}

.couple-progress {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.couple-play-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Player zones */
.player-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.4s ease;
    position: relative;
}

.player-zone.top {
    transform: rotate(180deg);
}

.player-zone.inactive {
    opacity: 0.4;
    filter: grayscale(0.5);
}

.player-zone.active {
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
}

.turn-indicator {
    font-size: 1rem;
    margin-bottom: 10px;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.player-zone.active .turn-indicator {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    color: white;
    animation: glowPulse 1.5s infinite;
}

.player-zone.inactive .turn-indicator {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.player-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Zone divider */
.zone-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, #e91e63, #9c27b0, #e91e63, transparent);
    position: relative;
    z-index: 5;
}

.zone-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #1a1a2e;
    border-radius: 50%;
    border: 3px solid #e91e63;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-divider::after {
    content: '\2665';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #e91e63;
    z-index: 6;
}

.zone-divider.switching {
    animation: turnSwitch 0.5s ease;
}

/* Couple deck display */
.couple-deck-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tap-to-draw {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

.player-zone.inactive .tap-to-draw {
    visibility: hidden;
}

/* Couple card display (shown card) */
.couple-card-display {
    background: #fff5f5;
    border-radius: 15px;
    border: 3px solid #e91e63;
    padding: 20px;
    width: 90%;
    max-width: 280px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.couple-card-display:active {
    transform: scale(0.98);
}

.couple-card-display.hidden {
    display: none;
}

.couple-card-message {
    color: #4a1942;
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: center;
}

.couple-card-message.rtl {
    direction: rtl;
    font-family: 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
}

@keyframes coupleCardReveal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.couple-card-display.revealing {
    animation: coupleCardReveal 0.4s ease;
}

@keyframes coupleCardDismiss {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

.couple-card-display.dismissing {
    animation: coupleCardDismiss 0.3s ease forwards;
}

.couple-complete-message {
    color: #4caf50;
    font-size: 1.2rem;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Couple controls */
.couple-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.couple-controls button {
    padding: 10px 25px;
    font-size: 0.85rem;
}

/* Fullscreen button */
.fullscreen-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    padding: 6px 10px;
    font-size: 0.75rem;
    z-index: 100;
    border-radius: 6px;
    text-transform: none;
    letter-spacing: 0;
}

.fullscreen-btn:hover {
    background: rgba(255, 215, 0, 0.2);
}
