* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    color: #1f2937;
    line-height: 1.6;
}

/* Header */
.header {
    border-bottom: 2px solid #10b981;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover {
    color: #10b981;
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 240px;
    background-color: #f9fafb;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #10b981;
    background-color: #ffffff;
}

.search-icon {
    position: absolute;
    left: 10px;
    color: #6b7280;
    pointer-events: none;
}

.x-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
}

.x-link:hover {
    color: #10b981;
    background-color: #f3f4f6;
    transform: translateY(-1px);
}

.login-link {
    text-decoration: none;
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.login-link:hover {
    color: #10b981;
}

.signup-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.signup-btn:active {
    transform: translateY(0);
}

/* Category Navigation */
.category-nav {
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    height: 4px;
}

.category-nav::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.category-nav::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.category-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    gap: 24px;
    white-space: nowrap;
}

.category-link {
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 0;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.category-link:hover {
    color: #10b981;
    transform: translateY(-1px);
}

.category-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s;
}

.category-link:hover::after {
    width: 100%;
}

/* Trending Topics */
.trending-topics {
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.trending-topics::-webkit-scrollbar {
    height: 4px;
}

.trending-topics::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.trending-topics::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.trending-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.trending-pill {
    padding: 8px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    background-color: #ffffff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.trending-pill:hover {
    border-color: #10b981;
    color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.trending-pill.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.content-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Main Market Card */
.main-market-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    min-height: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.main-market-card:hover {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.market-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 350px;
    color: #9ca3af;
    font-size: 16px;
}

/* Info Banners */
.info-banners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #d1fae5;
    transition: all 0.3s;
}

.info-banner:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.banner-icon svg {
    stroke: #ffffff;
}

.banner-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.banner-content p {
    font-size: 14px;
    color: #6b7280;
}

/* Market Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.market-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 0;
    aspect-ratio: 1;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.market-card:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    transform: translateY(-4px);
}

.market-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
}

.market-image-container {
    width: 100%;
    flex: 1;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.market-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s;
    display: block;
}

.market-card:hover .market-image {
    transform: scale(1.05);
}

.market-question {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin: 0;
    padding: 12px 16px;
}

.market-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px 12px 16px;
}

.market-volume {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.market-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    color: #9ca3af;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        margin-top: 12px;
    }

    .search-input {
        width: 180px;
    }

    .info-banners {
        grid-template-columns: 1fr;
    }

    .market-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 16px;
    }

    .main-nav {
        gap: 16px;
        overflow-x: auto;
    }

    .search-input {
        display: none;
    }

    .category-container,
    .trending-container {
        padding: 12px 16px;
    }

    .main-content {
        padding: 16px;
    }

    .market-grid {
        grid-template-columns: 1fr;
    }
}

/* Market Detail Modal */
.market-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
}

.market-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 16px;
    padding: 32px;
    max-width: 800px;
    width: 90%;
    margin: 40px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.market-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.market-detail-image-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.market-detail-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.market-detail-question {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    margin: 0;
}

.market-detail-stats {
    display: flex;
    gap: 32px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.yes-no-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.yes-no-container.four-options {
    grid-template-columns: 1fr 1fr;
}

.yes-no-container.six-options {
    grid-template-columns: repeat(3, 1fr);
}

.option-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s;
}

.option-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-label {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.option-probability {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

.option-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yes-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.yes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.yes-btn:active {
    transform: translateY(0);
}

.no-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.no-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.no-btn:active {
    transform: translateY(0);
}

.submit-prediction-container {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.submit-prediction-btn {
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.submit-prediction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.submit-prediction-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .market-detail-question {
        font-size: 22px;
    }

    .yes-no-container {
        grid-template-columns: 1fr;
    }
}

