:root {
    --primary: #2c3e50;
    --accent: #e74c3c;
    --accent-hover: #c0392b;
    --secondary: #3498db;
    --success: #27ae60;
    --success-hover: #219e50;
    --truth-color: #3498db;
    --dare-color: #e74c3c;
    --gray: #95a5a6;
    --light-gray: #ecf0f1;
    --text: #2c3e50;
    --bg-gradient: linear-gradient(135deg, #74ebd5, #9face6);
    --container-bg: white;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    --border-radius: 18px;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --primary: #ecf0f1;
    --text: #ecf0f1;
    --success: #27ae60;
    --container-bg: #1E123C;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    --bg-gradient: linear-gradient(135deg, #16213e, #0f3460);
}

.truth-dare-container {
    max-width: 100%;
    margin: auto;
    background: var(--container-bg);
    border-radius: 0;
    padding: 50px 30px;
    overflow: hidden;
    position: relative;
    transition: background 0.5s;
}

.theme-toggle {
    position: absolute;
    top: 5px;
    right: 35px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.truth-dare-title-suite{
    color:#e74c3ce6 !important;
}

.truth-dare-title{
    color:#ffffff !important;
}

body.dark-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle .sun {
    opacity: 1;
}

.theme-toggle .moon {
    opacity: 0.25;
}

body.dark-mode .theme-toggle .sun {
    opacity: 0.25;
}

body.dark-mode .theme-toggle .moon {
    opacity: 1;
}

.tool-wrapper {
    width: 100%;
    max-width: 82rem;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
    padding-bottom: 30px;
}

@media (min-width: 1024px) {
    .tool-wrapper {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}

.controls {
    color: var(--text);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

@media (min-width: 1024px) {
    .controls {
        grid-column: span 5 / span 5;
    }
}

body.dark-mode .controls {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Question Display Section */
.question-display-section {
    margin-bottom: 30px;
}

.question-type-badge {
    text-align: center;
    margin-bottom: 15px;
}

.badge-text {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: var(--truth-color);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: var(--transition);
}

.badge-text.dare {
    background: var(--dare-color);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.question-output-wrapper {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 3px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.question-output-wrapper.truth-mode {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.question-output-wrapper.dare-mode {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.question-output {
    background: var(--container-bg);
    padding: 30px 25px;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.6;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}

body.dark-mode .question-output {
    background: #2c2c3e;
}

.question-output.animating {
    animation: questionPulse 0.5s ease;
}

@keyframes questionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Category Control */
.control-section {
    margin-bottom: 30px;
}

.category-control label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.category-select {
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #bdc3c7;
    border-radius: 12px;
    background: white;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 50px;
}

body.dark-mode .category-select {
    background-color: #2c2c3e;
    border-color: #555;
    color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ecf0f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.category-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.category-select:hover {
    border-color: var(--accent);
}

/* Action Section */
.action-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.truth-btn,
.dare-btn {
    padding: 18px 16px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: white;
}

.truth-btn {
    background: var(--truth-color);
}

.truth-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(52, 152, 219, 0.3);
}

.dare-btn {
    background: var(--dare-color);
}

.dare-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(231, 76, 60, 0.3);
}

.truth-btn:active,
.dare-btn:active {
    transform: translateY(0);
}

.truth-btn svg,
.dare-btn svg {
    transition: transform 0.3s ease;
}

.truth-btn:hover svg,
.dare-btn:hover svg {
    transform: scale(1.1);
}

/* Options Section */
.options-section {
    margin-bottom: 30px;
}

.options-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text) !important;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid #bdc3c7;
    border-radius: 12px;
    background: white;
    transition: var(--transition);
    user-select: none;
}

body.dark-mode .checkbox-label {
    background: #2c2c3e;
    border-color: #555;
}

.checkbox-label:hover {
    border-color: var(--accent);
    background: rgba(231, 76, 60, 0.02);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

body.dark-mode .checkbox-custom {
    border-color: #555;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Stats Section */
.stats-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
}

body.dark-mode .stats-section {
    background: rgba(255, 255, 255, 0.03);
}

.stats-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text) !important;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--container-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-mode .stat-item {
    background: #2c2c3e;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
}

.reset-btn {
    width: 100%;
    padding: 10px;
    background: var(--gray);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.reset-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* History Section */
.history-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .history-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.history-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text) !important;
    font-weight: 600;
}

#historyList {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#historyList::-webkit-scrollbar {
    width: 6px;
}

#historyList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

body.dark-mode #historyList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#historyList::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.no-history {
    text-align: center;
    padding: 20px;
    color: var(--text);
    opacity: 0.5;
    font-style: italic;
}

.history-item {
    background: rgba(0, 0, 0, 0.03);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

body.dark-mode .history-item {
    background: rgba(255, 255, 255, 0.05);
}

.history-item.truth-item {
    border-left-color: var(--truth-color);
}

.history-item.dare-item {
    border-left-color: var(--dare-color);
}

.history-item:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateX(5px);
}

body.dark-mode .history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.history-type {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-type.truth {
    color: var(--truth-color);
}

.history-type.dare {
    color: var(--dare-color);
}

.history-time {
    color: var(--gray);
}

.history-question {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
}

.clear-btn {
    width: 100%;
    padding: 10px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.clear-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Info Display Container */
.info-display-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 1024px) {
    .info-display-container {
        grid-column: span 7 / span 7;
    }
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--container-bg);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: left;
    border: 1px solid #e5e7eb;
}

body.dark-mode .step {
    border-color: rgba(255, 255, 255, 0.1);
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #d70932;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.step p {
    margin: 0;
    font-size: 13px;
    color: var(--text);
}

.steps-grid-mobile {
    display: none;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.info-card {
    background: var(--container-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

body.dark-mode .info-card {
    border-color: rgba(255, 255, 255, 0.1);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text) !important;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text);
    line-height: 1.6;
}

.info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.category-info {
    padding: 8px 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.category-info strong {
    color: var(--accent);
    display: inline-block;
    min-width: 80px;
}

/* Timer Display */
.timer-display {
    position: absolute;
    top: 0;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    animation: timerPulse 1s ease infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-display.warning {
    background: var(--dare-color);
    animation: timerWarning 0.5s ease infinite;
}

@keyframes timerWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .truth-dare-container {
        padding: 50px 0;
    }

    .controls {
        margin-top: 0;
        border: none !important;
        box-shadow: none !important;
    }

    .tool-wrapper {
        width: 95%;
        gap: 0 !important;
    }

    .question-output {
        font-size: 1rem;
        padding: 25px 20px;
        min-height: 100px;
    }

    .action-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .steps-grid {
        display: none;
    }

    .steps-grid-mobile {
        display: block !important;
        padding-bottom: 50px;
    }

    .steps-grid-mobile .step {
        margin-bottom: 16px;
    }

    .info-section {
        padding: 0 10px;
    }

    .truth-btn,
    .dare-btn {
        padding: 16px 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .badge-text {
        font-size: 0.8rem;
        padding: 6px 20px;
    }

    .question-output {
        font-size: 0.95rem;
        padding: 20px 15px;
    }

    .category-select {
        font-size: 0.95rem;
    }
}