/* CSS Variables */
:root {
    /* Color Variables */
    --favorite-color: #f1c40f; /* Yellow color for favorite star */
    --icon-color: #cbd5e1; /* Default icon color */
    --hover-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --border-radius-small: 4px;
    --primary-color: #9b59b6;
    --secondary-color: #8e44ad;
    --text-primary: #2c3e50;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --game-accent: #e74c3c;
}

/* Breadcrumb Styling */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    margin: 1rem auto 2rem;
    max-width: 1200px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
    background: rgba(155, 89, 182, 0.1);
}

.breadcrumb span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb::before {
    content: "🎮";
    margin-right: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(155, 89, 182, 0.4);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Heading Fixes */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.category-header h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 1.8rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* FAQ Section Improvements */
.faq-section {
    margin: 3rem 0;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    background: var(--bg-secondary);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    border: none;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Game Page Specific Styles */
.game-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--game-accent));
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--hover-box-shadow);
    transform: translateY(-2px);
}

.tool-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.tool-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tool-card h3 a:hover {
    color: var(--primary-color);
}

.tool-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tool-card .tool-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background: rgba(155, 89, 182, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category-info {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.category-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.category-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* About Features Grid */
.about-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.about-feature-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.about-feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.about-feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.about-feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.about-feature-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.about-feature-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
    border-color: var(--primary-color);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.category-icon i {
    font-size: 1.5rem;
    color: white;
}

.category-card h3 {
    margin-bottom: 0.5rem;
}

.category-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-card h3 a:hover {
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.75rem 1rem;
        margin: 0.5rem auto 1.5rem;
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .breadcrumb::before {
        display: none;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .category-header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin: 1.5rem 0 1rem;
    }
    
    .game-tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .tool-card,
    .faq-item,
    .category-card {
        padding: 1rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        padding: 0.5rem 0.75rem;
        margin: 0.25rem auto 1rem;
        font-size: 0.75rem;
    }
    
    .back-to-top {
        bottom: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
    
    .category-header h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin: 1rem 0 0.75rem;
    }
    
    .tool-card,
    .faq-item,
    .category-card {
        padding: 0.75rem;
    }
    
    .faq-question {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0.75rem;
    }
    
    .about-features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .about-feature-item {
        padding: 1rem;
    }
    
    .about-feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .about-feature-icon i {
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .breadcrumb {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        margin: 0.25rem auto 0.75rem;
    }
    
    .back-to-top {
        width: 35px;
        height: 35px;
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .back-to-top i {
        font-size: 1rem;
    }
    
    .category-header h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .faq-question {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .tool-card,
    .faq-item,
    .category-card {
        padding: 0.6rem;
    }
}

/* Game Specific Styles */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Tools Description Section */
.tools-description {
    margin: 3rem 0;
}

.tool-description-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.tool-description-card:hover {
    box-shadow: var(--hover-box-shadow);
    transform: translateY(-2px);
}

.tool-description-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tool-description-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tool-benefits ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tool-benefits li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.tool-benefits li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.play-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.play-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
    color: white;
}

/* FAQ Section Styles */
.faq-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
    margin: 3rem 0;
}

/* Mobile Responsive FAQ */
@media (max-width: 768px) {
    .faq-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .faq-section-title {
        font-size: 2rem;
    }
    
    .faq-section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem 1rem;
    }
    
    .faq-toggle-icon {
        font-size: 1.3rem;
        min-width: 25px;
    }
}

@media (max-width: 480px) {
    .faq-section-title {
        font-size: 1.8rem;
    }
    
    .faq-question {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .faq-question-text {
        margin-right: 0.5rem;
    }
    
    .faq-toggle-icon {
        font-size: 1.2rem;
        min-width: 20px;
    }
}

.faq-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-section-title {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-weight: 700;
}

.faq-section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--hover-box-shadow);
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.3s ease;
    outline: none;
}

.faq-question:hover {
    color: var(--primary-color);
    background: rgba(155, 89, 182, 0.05);
}

.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.faq-question-text {
    flex: 1;
    margin-right: 1rem;
    line-height: 1.4;
}

.faq-toggle-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
    background: rgba(155, 89, 182, 0.02);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer-content {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

.game-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.game-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
