/* Invite Codes Page Specific Styles */

.codes-header {
    padding: 100px 0 30px;
    background: linear-gradient(180deg, #f9f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    text-align: center;
}

.page-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.page-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Filter Section */
.filter-section {
    padding: 40px 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 73px;
    z-index: 100;
}

.filter-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn svg {
    width: 18px;
    height: 18px;
}

.refresh-btn:hover {
    background: var(--primary-dark);
}

.refresh-btn.spinning svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Codes Grid */
.codes-section {
    padding: 120px 0 60px;
    background: var(--bg-secondary);
    min-height: 400px;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.code-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.code-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.code-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-status.active {
    background: #d1fae5;
    color: #065f46;
}

.code-status.used {
    background: #fef3c7;
    color: #92400e;
}

.code-status.expired {
    background: #fee2e2;
    color: #991b1b;
}

.code-source {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.code-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 0.05em;
    user-select: all;
    position: relative;
}

.code-display::selection {
    background: var(--primary-color);
    color: white;
}

.code-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.code-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.action-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 18px;
}

/* How To Section */
.howto-section {
    padding: 80px 0;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Sources Section */
.sources-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.source-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.source-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.source-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.source-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.source-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.source-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

/* Warning Section */
.warning-section {
    padding: 60px 0;
    background: white;
}

.warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: start;
}

.warning-icon {
    width: 32px;
    height: 32px;
    color: #f59e0b;
    flex-shrink: 0;
}

.warning-content h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #92400e;
}

.warning-content ul {
    list-style: none;
    padding: 0;
}

.warning-content li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    color: #78350f;
    line-height: 1.6;
}

.warning-content li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #f59e0b;
    font-weight: 700;
}

/* Submit Section */
.submit-section {
    padding: 80px 0;
    background: var(--bg-dark);
    text-align: center;
    color: white;
}

.submit-section .section-title {
    color: white;
    margin-bottom: 16px;
}

.submit-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal form {
    padding: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 40px;
    }

    .header-stats {
        gap: 30px;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-buttons {
        justify-content: center;
    }

    .codes-grid {
        grid-template-columns: 1fr;
    }

    .warning-box {
        flex-direction: column;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    width: 100%;
}

