/* ========================================
   Collab System Styles
   ======================================== */

/* ---------- Collabs Header ---------- */
.collabs-header {
    padding: 20px 0;
    background: transparent;
    position: relative;
    z-index: 10;
}
.collabs-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.collabs-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(to right, #E8A87C, #C3AED6, #A8D8EA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: url(#handDrawnNoise);
}
.collabs-nav {
    display: flex;
    gap: 28px;
}
.collabs-nav a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
.collabs-nav a:hover,
.collabs-nav a.active {
    color: var(--color-orange);
}

/* ---------- Collabs Hero ---------- */
.collabs-hero {
    padding: 80px 0 40px;
    text-align: center;
}
.collabs-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 16px;
    background: linear-gradient(to right, #E8A87C, #C3AED6, #A8D8EA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: url(#handDrawnNoise);
}
.collabs-hero-sub {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

/* ---------- Stats Bar ---------- */
.collabs-stats {
    padding: 24px 0;
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 60px;
}
.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
}
.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Collab Wall ---------- */
.collabs-wall {
    padding: 0 0 100px;
}
.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.wall-card {
    background: var(--color-paper);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    filter: url(#handDrawnNoise);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.wall-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.wall-card-logos {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.wall-card-community-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.wall-card-communities {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 16px;
}
.wall-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.wall-card-spots {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-text);
}
.wall-card-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
}
.status-live {
    background: rgba(76, 175, 80, 0.12);
    color: #4CAF50;
}
.status-upcoming {
    background: rgba(232, 168, 124, 0.12);
    color: var(--color-orange);
}
.status-completed {
    background: rgba(0,0,0,0.06);
    color: var(--color-text-light);
}

/* ---------- Timer ---------- */
.wall-card-timer {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-orange);
    padding: 8px 0;
    margin-bottom: 4px;
}
.wall-card-timer--expired {
    color: var(--color-text-light);
}
.wall-empty {
    text-align: center;
    padding: 60px 0;
}
.wall-empty p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* ---------- Apply Page ---------- */
.apply-section {
    padding: 60px 0 100px;
}
.apply-card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--color-paper);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    filter: url(#handDrawnNoise);
}
.apply-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 8px;
    text-align: center;
}
.apply-sub {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 36px;
}
.apply-field {
    margin-bottom: 24px;
}
.apply-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}
.apply-input,
.apply-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-bg);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}
.apply-input:focus,
.apply-textarea:focus {
    outline: none;
    border-color: var(--color-orange);
}
.apply-textarea {
    resize: vertical;
    min-height: 100px;
}
.apply-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 6px;
    display: block;
}

/* X Account Row */
.apply-x-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.apply-x-row .apply-input { flex: 1; }
.apply-x-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Fetch Button */
.btn-fetch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid var(--color-orange);
    border-radius: 12px;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--color-orange);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-fetch:hover {
    background: var(--color-orange);
    color: #fff;
}
.btn-fetch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-fetched {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
    color: #4CAF50;
    pointer-events: none;
}
.spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Discord Icon */
.apply-discord-icon {
    text-align: center;
    margin-bottom: 24px;
    color: #5865F2;
}
.apply-discord-icon svg {
    width: 64px;
    height: 64px;
}
.discord-connect-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 0 auto;
    background: #5865F2;
    border-color: #5865F2;
}
.discord-connect-btn:hover {
    background: #4752C4;
    border-color: #4752C4;
}
.apply-discord-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 600;
}
.apply-discord-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.apply-discord-info span {
    flex: 1;
}
.btn-logout {
    padding: 6px 14px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-logout:hover {
    border-color: #E57373;
    color: #E57373;
}

/* Steps Indicator */
.apply-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}
.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.step-dot.step-done {
    background: var(--color-orange);
}
.step-dot.step-active {
    background: var(--color-orange);
    box-shadow: 0 0 0 4px rgba(232,168,124,0.2);
}
.step-line {
    width: 40px;
    height: 2px;
    background: rgba(0,0,0,0.1);
}
.step-line + .step-dot.step-done {
    background: var(--color-orange);
}

/* Communities */
.communities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}
.community-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.community-row .apply-input { flex: 1; }
.btn-fetch-community {
    padding: 8px;
    font-size: 0.8rem;
    border-radius: 10px;
}
.btn-fetch-community.btn-fetched {
    padding: 8px 10px;
}
.community-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.btn-remove-community {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    background: transparent;
    font-size: 1.2rem;
    color: var(--color-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.btn-remove-community:hover {
    border-color: #E57373;
    color: #E57373;
}
.btn-add-community {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px dashed rgba(0,0,0,0.15);
    border-radius: 12px;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-add-community:hover {
    border-color: var(--color-orange);
    color: var(--color-orange);
}
.btn-add-community svg {
    width: 18px;
    height: 18px;
}
.apply-submit {
    width: 100%;
    margin-top: 8px;
}

/* Profile Preview */
.apply-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: 12px;
    margin-top: 24px;
}
.preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.preview-name {
    font-weight: 600;
    display: block;
}
.preview-handle {
    font-size: 0.9rem;
    color: var(--color-text-light);
}
.apply-success {
    text-align: center;
    padding: 40px 0;
}
.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(76, 175, 80, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #4CAF50;
}
.success-icon svg {
    width: 32px;
    height: 32px;
}
.apply-success h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 12px;
}
.apply-success p {
    color: var(--color-text-light);
}
.apply-success a {
    color: var(--color-orange);
    text-decoration: none;
    font-weight: 600;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-card {
    background: var(--color-paper);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
    position: relative;
    filter: url(#handDrawnNoise);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0,0,0,0.06);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: background 0.2s ease;
}
.modal-close:hover {
    background: rgba(0,0,0,0.1);
}
.collab-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.collab-modal-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-bg);
}
.collab-modal-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}
.collab-modal-name:hover {
    color: var(--color-orange);
}
.collab-modal-handle {
    font-size: 0.95rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}
.collab-modal-handle:hover {
    color: var(--color-orange);
}
.collab-modal-section {
    margin-bottom: 20px;
}
.collab-modal-section h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.collab-modal-communities {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-community-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: 10px;
    font-weight: 500;
}
.modal-community-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.08);
}
.collab-modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.collab-modal-stat {
    text-align: center;
    padding: 16px;
    background: var(--color-bg);
    border-radius: 12px;
}
.collab-modal-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}
.collab-modal-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .collabs-nav { gap: 16px; }
    .collabs-nav a { font-size: 0.95rem; }
    .wall-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .wall-card { padding: 16px; border-radius: 14px; }
    .wall-card-community-logo { width: 36px; height: 36px; }
    .wall-card-communities { font-size: 0.9rem; }
    .wall-card-spots { font-size: 0.85rem; }
    .wall-card-status { font-size: 0.65rem; padding: 3px 8px; }
    .apply-card { padding: 32px 24px; }
}
@media (max-width: 480px) {
    .collabs-header .container { flex-direction: column; gap: 12px; }
    .wall-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .wall-card { padding: 14px 12px; }
    .wall-card-community-logo { width: 32px; height: 32px; }
    .wall-card-communities { font-size: 0.85rem; margin-bottom: 12px; }
    .wall-card-footer { padding-top: 10px; }
    .wall-card-spots { font-size: 0.8rem; }
    .wall-card-status { font-size: 0.6rem; padding: 3px 6px; }
    .collabs-hero-title { font-size: 2.5rem; }
}
