/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #2d3748;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Particles Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: float 6s infinite linear;
    opacity: 0.3;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out;
}

.profile-section {
    position: relative;
}

.profile-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.profile-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat i {
    color: var(--accent-color);
}

/* Links Container */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: var(--transition);
}

.link-card:hover::before {
    left: 100%;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), var(--shadow-glow);
}

.link-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 16px;
    flex-shrink: 0;
    transition: var(--transition);
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    transition: var(--transition);
}

.link-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.link-arrow {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-left: 12px;
}

.link-card:hover .link-arrow {
    transform: translateX(4px);
    color: var(--primary-color);
}

.link-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    border-radius: 16px;
}

/* Specific Link Styles */
.restaurant-link .link-icon {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
}

.restaurant-link:hover .link-glow {
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
    opacity: 1;
}

.manicure-link .link-icon {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: white;
}

.manicure-link:hover .link-glow {
    box-shadow: 0 0 30px rgba(255, 154, 158, 0.3);
    opacity: 1;
}

.law-link .link-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.law-link:hover .link-glow {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
    opacity: 1;
}

.clinic-link .link-icon {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.clinic-link:hover .link-glow {
    box-shadow: 0 0 30px rgba(116, 185, 255, 0.3);
    opacity: 1;
}

.farm-link .link-icon {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
}

.farm-link:hover .link-glow {
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.3);
    opacity: 1;
}

.ai-link .link-icon {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    color: white;
}

.ai-link:hover .link-glow {
    box-shadow: 0 0 30px rgba(253, 121, 168, 0.3);
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-2px);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Delays */
.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .profile-name {
        font-size: 1.75rem;
    }
    
    .link-card {
        padding: 16px 20px;
    }
    
    .link-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-right: 12px;
    }
    
    .link-content h3 {
        font-size: 1rem;
    }
    
    .link-content p {
        font-size: 0.85rem;
    }
    
    .profile-stats {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: 40px;
    }
    
    .links-container {
        gap: 20px;
    }
    
    .link-card {
        padding: 24px 28px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Focus States for Accessibility */
.link-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.social-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle {
        animation: none;
    }
}
