/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #FAFAFA;
    --color-text: #1A1A1A;
    --color-text-light: #6B7280;
    --color-border: #1A1A1A;
    
    --color-primary: #8B5CF6;
    --color-primary-hover: #7C3AED;
    --color-secondary: #06B6D4;
    
    --color-tech-green: #10B981;
    --color-tech-red: #DC2626;
    
    --color-pastel-purple: #F3E8FF;
    --color-pastel-blue: #E0F2FE;
    --color-pastel-pink: #FCE7F3;
    
    --font-main: 'Inter', 'Tajawal', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    background-image: linear-gradient(135deg, #FAFAFA 0%, #F3E8FF 50%, #E0F2FE 100%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Header ===== */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    border-bottom: 3px solid var(--color-border);
    background-color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #FFFFFF;
}

.site-header nav a:hover {
    box-shadow: 4px 4px 0px var(--color-border);
    transform: translateY(-2px);
}

.site-header nav a.btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-border);
}

.site-header nav a.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 4px 4px 0px var(--color-border);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 70vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===== Search Bar ===== */
.search-bar {
    width: 100%;
}

.input-box {
    display: flex;
    width: 100%;
    border: 3px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
    transition: box-shadow 0.2s ease;
}

.input-box:focus-within {
    box-shadow: 4px 4px 0px var(--color-border);
}

.input-box input {
    flex: 1;
    padding: 1rem 1.2rem;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background: transparent;
    color: var(--color-text);
}

.input-box input::placeholder {
    color: var(--color-text-light);
}

.input-box .btn-primary {
    border-radius: 0;
    border-left: 3px solid var(--color-border);
    border-top: none;
    border-bottom: none;
    border-right: none;
    padding: 1rem 1.5rem;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.input-box .btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: none;
    box-shadow: none;
}

.btn-primary {
    padding: 1rem 2rem;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: 3px solid var(--color-border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 4px 4px 0px var(--color-border);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 0.7rem 1.2rem;
    background-color: #FFFFFF;
    color: var(--color-text);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-secondary:hover {
    box-shadow: 3px 3px 0px var(--color-border);
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ===== Hero Illustration ===== */
.hero-illustration {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration svg {
    width: 100%;
    max-width: 550px;
    height: auto;
}

/* ===== Status Messages ===== */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
}

.status-message i {
    font-size: 1.2rem;
}

.status-message.error {
    background-color: #FEF2F2;
    border-color: var(--color-tech-red);
    color: var(--color-tech-red);
}

.status-message:not(.error) {
    background-color: var(--color-pastel-blue);
    border-color: var(--color-secondary);
    color: #0891B2;
}

/* ===== Results Section ===== */
.results-section {
    border-top: 3px solid var(--color-border);
    background: #FFFFFF;
    padding: 4rem 2rem;
}

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

.results-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.results-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.track-list-container {
    max-width: 900px;
    margin: 0 auto;
}

.track-list {
    list-style: none;
    border: 3px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
}

.track-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.track-item:last-child {
    border-bottom: none;
}

.track-cover {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    object-fit: cover;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.track-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text);
}

.track-artist {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.track-preview {
    width: 140px;
    height: 36px;
    border-radius: 18px;
    overflow: hidden;
}

.track-preview audio {
    width: 100%;
    height: 100%;
}

.results-actions {
    text-align: center;
    margin-top: 3rem;
}

/* ===== Sections General ===== */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--color-text);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ===== Cards Grid ===== */
.cards-grid, .platforms-grid, .needs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card, .platform-card, .need-card {
    background: #FFFFFF;
    border: 3px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.card:hover, .platform-card:hover, .need-card:hover {
    box-shadow: 6px 6px 0px var(--color-border);
    transform: translateY(-4px);
}

/* Unified icon size */
.card-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
}

.card-icon svg {
    width: 60px;
    height: 60px;
}

.platform-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
    margin-bottom: 1rem;
}

.platform-logo svg {
    width: 60px;
    height: 60px;
}

.card h3, .platform-card h3, .need-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.card p, .platform-card p, .need-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ===== Half Card (Text + Illustration like Brave) ===== */
.half-cards-container {
    margin-top: 2rem;
}

.half-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 3px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.half-card:hover {
    box-shadow: 6px 6px 0px var(--color-border);
    transform: translateY(-4px);
}

.half-card:nth-child(even) {
    direction: rtl;
}

.half-card:nth-child(even) .half-card-content {
    direction: ltr;
}

.half-card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.half-card-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.half-card-content p {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.7;
}

.half-card-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--color-pastel-purple);
}

.half-card-illustration svg,
.half-card-illustration img {
    width: 100%;
    max-width: 280px;
    height: auto;
}

.half-card:nth-child(2) .half-card-illustration {
    background: var(--color-pastel-blue);
}

.half-card:nth-child(3) .half-card-illustration {
    background: var(--color-pastel-pink);
}

/* ===== Future Platforms ===== */
.future-platforms {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 3px dashed var(--color-border);
}

.future-platforms h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-text);
}

.future-platforms > p {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.platform-card.future {
    opacity: 0.6;
    border-style: dashed;
}

/* ===== Algorithm Box ===== */
.algorithm-box {
    background: #FFFFFF;
    border: 3px solid var(--color-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    box-shadow: 6px 6px 0px var(--color-border);
}

.algorithm-content {
    flex: 1;
}

.algorithm-illustration {
    flex: 0 0 220px;
}

.algorithm-illustration svg {
    width: 100%;
    height: auto;
}

.algorithm-box > .algorithm-content > p:first-child {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.algorithm-box ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.algorithm-box li {
    padding: 1rem 0;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.algorithm-box li:last-child {
    border-bottom: none;
}

.algorithm-box li i {
    color: var(--color-tech-green);
    margin-top: 0.3rem;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.algorithm-box .note {
    margin-top: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-tech-red);
}

.algorithm-box a {
    color: var(--color-tech-red);
    text-decoration: underline;
    font-weight: 700;
}

/* ===== Comparison Table ===== */
.comparison-table {
    border: 3px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 2rem;
    background: #FFFFFF;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    border-bottom: 2px solid var(--color-border);
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row > div {
    padding: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.comparison-row.header {
    background: var(--color-text);
    color: #FFFFFF;
    font-weight: 700;
}

.comparison-row.header > div:first-child {
    justify-content: flex-start;
}

.comparison-row > div:first-child {
    justify-content: flex-start;
    font-weight: 600;
}

.yes {
    color: var(--color-tech-green);
    font-weight: 700;
}

.no {
    color: var(--color-tech-red);
    font-weight: 700;
}

.maybe {
    color: #F59E0B;
    font-weight: 700;
}

/* ===== FAQ - Accordion ===== */
.faq-list {
    max-width: 800px;
    margin: 2rem auto 0;
}

.faq-item {
    border: 3px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #FFFFFF;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

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

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
    background: #FFFFFF;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.faq-question h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
    margin: 0;
    flex: 1;
}

.faq-question h3 i {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.faq-item:hover .faq-question h3 i {
    color: var(--color-primary);
}

.faq-toggle {
    font-size: 1.2rem;
    color: var(--color-text);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--color-bg);
}

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

.faq-answer p {
    color: var(--color-text-light);
    line-height: 1.7;
    padding-left: 1.8rem;
}

/* ===== Contribute Section ===== */
.contribute-section {
    background: var(--color-pastel-pink);
    border-top: 3px solid var(--color-border);
    border-bottom: 3px solid var(--color-border);
    max-width: 100%;
}

.contribute-section > h2,
.contribute-section > .honest-note,
.contribute-section > .needs-grid,
.contribute-section > .contributors-section,
.contribute-section > .cta-box {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.honest-note {
    background: #FFFFFF;
    border: 3px solid var(--color-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem auto;
    text-align: center;
}

.honest-note p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--color-text);
}

.honest-note p:last-child {
    margin-bottom: 0;
}

.honest-note p:first-child {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-primary);
}

.cta-box {
    text-align: center;
    margin-top: 3rem;
    padding: 2.5rem;
    background: #FFFFFF;
    border: 3px solid var(--color-border);
    border-radius: 16px;
}

.cta-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.cta-box p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

.cta-box a:not(.btn-primary) {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ===== Contributors Section ===== */
.contributors-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 3px dashed var(--color-border);
    text-align: center;
}

.contributors-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-text);
}

.contributors-section h3 i {
    color: var(--color-primary);
}

.contributors-section > p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contributor-card {
    background: #FFFFFF;
    border: 3px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.contributor-card:hover {
    box-shadow: 4px 4px 0px var(--color-border);
    transform: translateY(-3px);
}

.contributor-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    margin-bottom: 0.5rem;
}

.contributor-card .name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    word-break: break-word;
    color: var(--color-text);
}

.contributor-card .contributions {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.contributor-card a {
    text-decoration: none;
    color: inherit;
}

.contributor-placeholder {
    grid-column: 1 / -1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-light);
}

.contributor-placeholder i {
    font-size: 2rem;
    color: var(--color-primary);
}

.contributors-note {
    margin-top: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-primary);
}

.contributors-note a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-text);
    color: #FFFFFF;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h3 {
    color: var(--color-primary);
}

.footer-section h3 img {
    width: 24px;
    height: 24px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #FFFFFF;
    text-decoration: none;
    opacity: 0.8;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid #333;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom i {
    color: var(--color-primary);
}

/* ===== Unified Icon Colors ===== */
.platform-logo i {
    color: var(--color-text) !important;
    font-size: 3.5rem !important;
    transition: all 0.2s ease;
}

.platform-card:hover .platform-logo i {
    color: var(--color-primary);
}

.card-icon i {
    color: var(--color-text) !important;
    font-size: 3.5rem !important;
    transition: all 0.2s ease;
}

.need-card:hover .card-icon i {
    color: var(--color-primary);
}

.faq-item h3 i {
    color: var(--color-text) !important;
}

.faq-item:hover h3 i {
    color: var(--color-primary);
}

/* ===== Mobile Table Fix ===== */
@media (max-width: 768px) {
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
        background: #FFFFFF;
        border: 2px solid var(--color-border);
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .comparison-row.header {
        display: none;
    }
    
    .comparison-row > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--color-border);
    }
    
    .comparison-row > div:last-child {
        border-bottom: none;
    }
    
    .comparison-row > div:first-child {
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--color-text);
        border-bottom: 2px solid var(--color-primary);
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .comparison-row > div:nth-child(2)::before {
        content: "yoobify:";
        font-weight: 600;
        color: var(--color-text-light);
        margin-right: 0.5rem;
    }
    
    .comparison-row > div:nth-child(3)::before {
        content: "Others:";
        font-weight: 600;
        color: var(--color-text-light);
        margin-right: 0.5rem;
    }
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
        gap: 3rem;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .algorithm-box {
        flex-direction: column;
    }
    
    .algorithm-illustration {
        flex: 0 0 auto;
        max-width: 200px;
    }
    
    .half-card {
        grid-template-columns: 1fr;
    }
    
    .half-card:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem 1.5rem;
    }
    
    .site-header nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .track-item {
        grid-template-columns: 55px 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .track-preview {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 0.75rem;
    }
    
    .algorithm-box, .honest-note, .cta-box {
        padding: 1.75rem;
    }
    
    .half-card-content {
        padding: 1.5rem;
    }
}
