/* 
* Main Stylesheet for instanttruthordare.com
* Optimized for performance and SEO
*/

/* Base styles and reset */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #ff6584;
    --text-color: #212529;
    --light-text: #6c757d;
    --background: #f8f9fa;
    --white: #ffffff;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #5a52d9;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading spinner */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
    color: var(--white);
}

.btn.primary {
    background-color: var(--primary-color);
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--text-color);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 30px;
    height: 2px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #6c63ff 0%, #3f3d9c 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero .buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Game Section */
.game-container {
    padding: 80px 0;
}

/* Player Management */
.player-management {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.player-input-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.player-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.player-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.player-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    min-height: 40px;
}

.player-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
}

.player-chip.active {
    background-color: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(255, 101, 132, 0.3);
}

.player-chip button {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-chip button:hover {
    opacity: 0.8;
}

.player-hint {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-top: 10px;
}

.current-turn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.current-turn h3 {
    margin: 0 0 15px 0;
    color: var(--white);
    font-size: 1.5rem;
}

.current-turn #current-player-name {
    color: #ffeb3b;
    font-weight: 700;
}

.game-ideas-section,
.custom-builder {
    padding: 80px 0;
}

.intro-text {
    font-size: 1.1rem;
    margin-bottom: 40px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.game-ideas-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.game-idea-card,
.value-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.game-idea-card:hover,
.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.game-idea-card h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.game-idea-card p {
    margin-bottom: 10px;
}

.game-idea-card strong {
    color: var(--primary-color);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.game-tips,
.custom-tips {
    padding: 80px 0;
    background-color: var(--white);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.tip-card {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 25px;
    border-left: 4px solid var(--primary-color);
}

.tip-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Custom Questions Page */
.question-form-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.question-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
}

.question-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.form-controls select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background-color: var(--white);
}

.form-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.custom-questions-display {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.custom-list {
    margin-top: 20px;
    min-height: 100px;
}

.custom-list-item {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-list-item:hover {
    background-color: #e9ecef;
}

.custom-list-item .question-text {
    flex: 1;
    margin-right: 15px;
}

.custom-list-item .question-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    background-color: var(--primary-color);
    color: var(--white);
    margin-right: 10px;
}

.custom-list-item button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.custom-list-item button:hover {
    background-color: #c64f67;
}

.empty-state {
    text-align: center;
    color: var(--light-text);
    padding: 40px 20px;
}

.custom-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.custom-examples {
    padding: 80px 0;
    background-color: var(--background);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.example-category {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.example-category h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.example-category ul {
    list-style: none;
    padding: 0;
}

.example-category ul li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.example-category ul li:last-child {
    border-bottom: none;
}

.page-hero {
    background: linear-gradient(135deg, #6c63ff 0%, #3f3d9c 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.page-hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.builder-intro {
    text-align: center;
    margin-bottom: 40px;
}

.builder-intro h2 {
    margin-bottom: 15px;
}

.about-story,
.about-mission {
    padding: 80px 0;
}

.about-mission {
    background-color: var(--background);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-values {
    padding: 80px 0;
    background-color: var(--white);
}

.game-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.filters, .difficulty {
    flex: 1;
    min-width: 300px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.range-slider {
    margin-top: 15px;
}

.range-slider input {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.range-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--light-text);
}

.game-board {
    margin-top: 40px;
    text-align: center;
}

.card-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.card {
    width: 300px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.card-front {
    background: linear-gradient(135deg, #6c63ff 0%, #3f3d9c 100%);
    color: var(--white);
}

.truth-card .card-front {
    background: linear-gradient(135deg, #6c63ff 0%, #3f3d9c 100%);
}

.dare-card .card-front {
    background: linear-gradient(135deg, #ff6584 0%, #c64f67 100%);
}

.card-front h3 {
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.card-back {
    background-color: var(--white);
    transform: rotateY(180deg);
    box-shadow: var(--box-shadow);
}

.card-back p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.new-question {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.new-question:hover {
    background-color: #5a52d9;
}

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

/* Categories Section */
.categories {
    padding: 80px 0;
    background-color: var(--white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.category-card h3 {
    margin-bottom: 15px;
}

.category-card p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.category-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 500;
}

.category-link:hover {
    background-color: #5a52d9;
    color: var(--white);
}

/* How to Play Section */
.how-to-play {
    padding: 80px 0;
    background-color: var(--background);
}

.steps {
    margin-top: 40px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.step-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 10px;
}

.step-content p {
    color: var(--light-text);
}

/* Popular Questions Section */
.popular-questions {
    padding: 80px 0;
    background-color: var(--white);
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    padding: 15px 30px;
    border: none;
    background-color: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active:after {
    width: 100%;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.question-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.question-item {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.question-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.question-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.category-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--white);
}

.category-tag.classic {
    background-color: #6c63ff;
}

.category-tag.funny {
    background-color: #33d2a0;
}

.category-tag.spicy {
    background-color: #ff6584;
}

.category-tag.kids {
    background-color: #ffbe0b;
}

.category-tag.party {
    background-color: #fb5607;
}

/* Call to Action Section */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #6c63ff 0%, #3f3d9c 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background-color: var(--background);
}

.accordion {
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.accordion-item {
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.accordion-header {
    padding: 20px;
    background-color: var(--white);
    cursor: pointer;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}

.accordion-header:after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.accordion-item.active .accordion-header:after {
    content: '-';
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    background-color: var(--white);
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 0 20px 20px;
    max-height: 1000px;
}

/* Footer */
footer {
    background-color: #212529;
    color: #e9ecef;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 30px;
    flex: 1;
    min-width: 250px;
}

.footer-logo h2 {
    color: var(--white);
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    flex: 2;
}

.footer-column {
    min-width: 160px;
}

.footer-column h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #adb5bd;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #343a40;
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    nav.mobile-active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .card {
        width: 280px;
        height: 350px;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
    
    .footer-logo {
        width: 100%;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .hero .buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .card {
        width: 100%;
        max-width: 300px;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

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

.fadeIn {
    animation: fadeIn 0.5s forwards;
}

/* Accessibility Improvements */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px;
    background-color: var(--primary-color);
    color: var(--white);
    z-index: 1000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Print styles */
@media print {
    .hero,
    .game-options,
    .card-container,
    .game-controls,
    .cta,
    footer {
        display: none;
    }
    
    body {
        background-color: var(--white);
        color: #000;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .question-list {
        display: block;
    }
    
    .question-item {
        page-break-inside: avoid;
        margin-bottom: 20px;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
