/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background-dark: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --card-bg: #2a2a2a;
    --hover-bg: #333333;
}

/* Color palette for fallacy cards */
.color-1 { background: #e74c3c; }
.color-2 { background: #3498db; }
.color-3 { background: #2ecc71; }
.color-4 { background: #f39c12; }
.color-5 { background: #9b59b6; }
.color-6 { background: #1abc9c; }
.color-7 { background: #e67e22; }
.color-8 { background: #34495e; }
.color-9 { background: #16a085; }
.color-10 { background: #c0392b; }
.color-11 { background: #8e44ad; }
.color-12 { background: #d35400; }
.color-13 { background: #27ae60; }
.color-14 { background: #e91e63; }
.color-15 { background: #9c27b0; }
.color-16 { background: #00bcd4; }
.color-17 { background: #795548; }
.color-18 { background: #607d8b; }
.color-19 { background: #ff5722; }
.color-20 { background: #673ab7; }
.color-21 { background: #009688; }
.color-22 { background: #ffc107; }
.color-23 { background: #4caf50; }
.color-24 { background: #ff9800; }
.color-25 { background: #2196f3; }
.color-26 { background: #f44336; }
.color-27 { background: #8bc34a; }
.color-28 { background: #03a9f4; }
.color-29 { background: #cddc39; }
.color-30 { background: #ff6f00; }
.color-31 { background: #b71c1c; }
.color-32 { background: #5e35b1; }
.color-33 { background: #00897b; }
.color-34 { background: #d81b60; }
.color-35 { background: #6a1b9a; }
.color-36 { background: #00acc1; }
.color-37 { background: #5d4037; }

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--background-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

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

/* Header */
.header {
    background: var(--background-dark);
    color: var(--text-white);
    padding: 40px 20px 30px;
    text-align: center;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0;
    letter-spacing: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Fallacy Grid */
.fallacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    margin-bottom: 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Fallacy Card */
.fallacy-card {
    background: var(--card-bg);
    padding: 40px 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    min-height: 280px;
    justify-content: center;
}

.fallacy-card:hover {
    background: var(--hover-bg);
    transform: scale(1.02);
    z-index: 10;
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
    transition: transform 0.2s ease;
}

.fallacy-card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0;
    color: var(--text-white);
    line-height: 1.3;
}

.card-subtitle {
    display: none;
}

.card-tagline {
    display: none;
}

/* Detail View */
.fallacy-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    position: relative;
}

/* Navigation Arrows */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--text-gray);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-arrow-left {
    left: 20px;
}

.nav-arrow-right {
    right: 20px;
}

.detail-content {
    background: transparent;
    padding: 0;
}

.detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 20px auto 30px;
    color: white;
}

.detail-title {
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: var(--text-white);
    text-align: center;
    line-height: 1.3;
}

.detail-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    font-style: normal;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 300;
}

.detail-tagline {
    font-size: 1.3rem;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 400;
    line-height: 1.5;
}

.detail-section {
    margin: 40px 0;
    padding: 0;
    border-top: none;
}

.detail-section:first-of-type {
    border-top: none;
}

.detail-section h3 {
    display: none;
}

.detail-section p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

.detail-footer {
    margin-top: 60px;
    padding-top: 0;
    border-top: none;
    text-align: center;
}

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

.share-button {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 3px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
}

.share-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

/* Footer */
.footer {
    background: var(--background-dark);
    color: var(--text-gray);
    padding: 50px 20px;
    text-align: center;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.footer p {
    margin: 8px 0;
    font-weight: 300;
}

.footer a {
    color: var(--text-gray);
    text-decoration: underline;
    font-weight: 300;
}

.footer a:hover {
    color: var(--text-white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }

    .site-subtitle {
        font-size: 1rem;
    }

    .fallacy-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .detail-content {
        padding: 30px 20px;
    }

    .detail-title {
        font-size: 2rem;
    }

    .detail-tagline {
        font-size: 1.1rem;
    }

    .detail-section h3 {
        font-size: 1.3rem;
    }

    .detail-section p {
        font-size: 1rem;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .nav-arrow-left {
        left: 10px;
    }

    .nav-arrow-right {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 40px 20px;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .fallacy-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-button {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fallacy-card {
    animation: fadeIn 0.3s ease-out;
}

.fallacy-detail {
    animation: fadeIn 0.3s ease-out;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 16px 24px;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
