/* ================================================
   FIORRA REFER - ÖNER KAZAN
   Created with love 💜 
   Son Düzenleme 17:12:24 16:00:00
   Instagram ve SMS stilleri eklendi (8 buton)
   ================================================ */

:root {
    /* Colors */
    --primary-purple: #9d4edd;
    --primary-pink: #ff6b9d;
    --soft-blue: #7209b7;
    --deep-purple: #5a189a;
    --gold: #ffd700;
    --gold-dark: #b8860b;
    
    /* Gradients */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-full: 999px;
    
    /* Shadows */
    --shadow-glow: 0 8px 32px rgba(157, 78, 221, 0.3);
    --shadow-gold: 0 8px 32px rgba(255, 215, 0, 0.3);
}

/* ================================================
   GLOBAL STYLES
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ================================================
   AURORA BACKGROUND
   ================================================ */

.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, 
        #1e1e2e 0%,
        #2d1b4e 25%,
        #4a1f6f 50%,
        #5e2a84 75%,
        #7b2d8f 100%
    );
}

/* ================================================
   CONTAINER
   ================================================ */

.refer-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
    min-height: 100vh;
}

/* ================================================
   HEADER
   ================================================ */

.refer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: rgba(30, 30, 46, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title .icon {
    font-size: 1.8rem;
}

/* ================================================
   MAIN CONTENT
   ================================================ */

.refer-main {
    padding: var(--spacing-md);
}

/* ================================================
   LOADING STATE
   ================================================ */

.loading-state {
    text-align: center;
    padding: var(--spacing-xl);
}

.loading-spinner {
    margin: 0 auto;
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #9d4edd;
    animation-duration: 1.5s;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #ffd700;
    animation-duration: 2s;
}

.spinner-ring.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
    position: static;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: var(--spacing-md);
    font-size: 1rem;
    opacity: 0.8;
}

/* ================================================
   CODE CARD
   ================================================ */

.code-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 107, 157, 0.15));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    margin-bottom: var(--spacing-md);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.code-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.code-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.code-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
}

.code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.code-text {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: white;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'SF Mono', 'Menlo', monospace;
}

.copy-code-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--gold);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
}

.copy-code-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.1);
}

.copy-code-btn.copied {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.code-hint {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ================================================
   INFO CARD
   ================================================ */

.info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.info-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.info-step {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ff6b9d 0%, #9d4edd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

.reward-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 107, 157, 0.1));
    border-radius: var(--radius-sm);
}

.reward-item {
    text-align: center;
}

.reward-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.3rem;
}

.reward-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.reward-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* ================================================
   SHARE SECTION
   ================================================ */

.share-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.share-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.share-btn .share-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn .share-icon svg {
    width: 24px;
    height: 24px;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.share-btn.sms {
    background: linear-gradient(135deg, #34c759, #28a745);
}

.share-btn.instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877F2, #0d5fc4);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
}

.share-btn.email {
    background: linear-gradient(135deg, #EA4335, #c5221f);
}

.share-btn.copy-link {
    background: linear-gradient(135deg, #9d4edd, #7209b7);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.share-btn:active {
    transform: translateY(0);
}

/* ================================================
   APPLY SECTION
   ================================================ */

.apply-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.apply-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    text-align: center;
}

.apply-description {
    font-size: 0.9rem;
    opacity: 0.7;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.apply-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.apply-input-group {
    display: flex;
    gap: var(--spacing-sm);
}

.apply-input {
    flex: 1;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1.1rem;
    font-family: 'SF Mono', 'Menlo', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

.apply-input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
}

.apply-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    text-transform: none;
    letter-spacing: normal;
}

.apply-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, #ff6b9d 0%, #9d4edd 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
}

.apply-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.4);
}

.apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-btn .btn-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================================
   ALREADY APPLIED
   ================================================ */

.already-applied {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.applied-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.applied-text {
    font-size: 1rem;
    color: #4ade80;
}

/* ================================================
   STATS CARD
   ================================================ */

.stats-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.stats-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 480px) {
    .code-text {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .apply-input-group {
        flex-direction: column;
    }
    
    .apply-btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-info {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .reward-divider {
        width: 80%;
        height: 1px;
    }
}
