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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.screen {
    display: none;
    padding: 15px;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Setup Screen */
#setup-screen h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
    font-weight: bold;
}

/* Settings Section */
.settings-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.settings-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.packages-title {
    margin-top: 20px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Packages List */
.packages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.package-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.package-item:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.package-item .checkbox-label {
    margin-bottom: 5px;
}

.package-description {
    font-size: 0.85em;
    color: #666;
    margin-left: 28px;
    font-weight: normal;
    cursor: pointer;
}

/* Buttons */
button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-controls {
    margin-top: 20px;
}

#start-game {
    background: #667eea;
    color: white;
    font-size: 18px;
    padding: 20px;
}

#start-game:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-2px);
}

#start-game:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    background: #6c757d;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    width: auto;
}

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

.round-info {
    font-size: 1em;
    font-weight: bold;
    color: #667eea;
}

/* Card Display */
.card-display {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.card {
    background: white;
    border: 3px solid #667eea;
    border-radius: 15px;
    padding: 25px 20px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
    /* 3:4 aspect ratio */
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.card.truth {
    border-color: #2196F3;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.card.dare {
    border-color: #FFA500;
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

.card:hover {
    transform: translateY(-5px);
}

.card.card-exit {
    animation: cardFallOut 0.5s cubic-bezier(0.6, 0.04, 0.98, 0.34) forwards;
}

.card.card-enter {
    animation: cardFallIn 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes cardFallOut {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-150%, 120%) rotate(-25deg);
        opacity: 0;
    }
}

@keyframes cardFallIn {
    0% {
        transform: translate(110%, -170%) rotate(50deg);
        opacity: 0;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
}

.card-package {
    font-size: 0.9em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.card-type {
    margin-bottom: 20px;
}

.card-type h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.8em;
    text-align: center;
    letter-spacing: 3px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card-type h2.truth {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.card-type h2.dare {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

.card-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.card-content p {
    font-size: 1.7em;
    font-weight: bold;
    line-height: 1.6;
    color: #333;
}

/* Game Controls */
.pass-btn {
    background: #6c757d;
    color: white;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.pass-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: none;
}

.pass-btn.pressing::before {
    animation: progressLoad 1s linear forwards;
}

@keyframes progressLoad {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

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

.type-buttons {
    display: flex;
    gap: 10px;
}

.type-buttons button {
    flex: 1;
}

.truth-btn {
    background: #2196F3;
    color: white;
}

.truth-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.dare-btn {
    background: #FFA500;
    color: white;
}

.dare-btn:hover {
    background: #FF8C00;
    transform: translateY(-2px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

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

.modal-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.8;
}

.modal-info strong {
    color: #667eea;
}

.modal-hint {
    display: block;
    margin-top: 10px;
    font-style: italic;
    font-size: 0.9em;
    color: #999;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.modal-buttons button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.continue-btn {
    background: #28a745;
    color: white;
}

.continue-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.new-game-btn {
    background: #dc3545;
    color: white;
}

.new-game-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Animation for screen transitions */
.screen.active {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background: #000000;
    color: #ffffff;
}

body.dark-mode .container {
    background: #000000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Setup Screen Dark Mode */
body.dark-mode #setup-screen h1 {
    color: #ffffff;
}

/* Settings Section Dark Mode */
body.dark-mode .settings-section {
    background: #1a1a1a;
    border-color: #333333;
}

body.dark-mode .settings-section h3 {
    color: #ffffff;
}

body.dark-mode .checkbox-label {
    color: #cccccc;
}

body.dark-mode .checkmark {
    background: #222222;
    border-color: #333333;
}

body.dark-mode .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

/* Packages Dark Mode */
body.dark-mode .package-item {
    background: #1a1a1a;
    border-color: #333333;
}

body.dark-mode .package-item:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

body.dark-mode .package-description {
    color: #999999;
}

/* Game Screen Dark Mode */
body.dark-mode .round-info {
    color: #667eea;
}

/* Card Display Dark Mode */
body.dark-mode .card {
    background: #1a1a1a;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

body.dark-mode .card.truth {
    border-color: #2196F3;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

body.dark-mode .card.dare {
    border-color: #FFA500;
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

body.dark-mode .card-package {
    color: #667eea;
    border-bottom-color: #333333;
}

body.dark-mode .card-content p {
    color: #ffffff;
}

/* Toast Dark Mode */
body.dark-mode .toast {
    background: #6c757d;
    color: #ffffff;
}

/* Modal Dark Mode */
body.dark-mode .modal-content {
    background: #1a1a1a;
}

body.dark-mode .modal-content h3 {
    color: #ffffff;
}

body.dark-mode .modal-info {
    background: #222222;
    color: #cccccc;
}

body.dark-mode .modal-info strong {
    color: #667eea;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .screen {
        padding: 15px;
    }
    
    #setup-screen h1 {
        font-size: 1.8em;
    }
    
    .card {
        padding: 20px 15px;
        min-height: 350px;
    }
    
    .card-type h2 {
        font-size: 1.5em;
    }
    
    .card-content p {
        font-size: 1em;
    }
}
