* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme (default) */
    --container-bg: rgba(45, 55, 72, 0.95);
    --text-primary: white;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(0, 0, 0, 0.2);
    --card-hover-bg: rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    --social-icon-bg: rgba(255, 255, 255, 0.1);
    --fps-bg: rgba(0, 0, 0, 0.5);
    --fps-text: white;
    --accent-color: #4ade80;
    --toast-bg: rgba(30, 41, 59, 0.95);
    --toast-text: #fff;
    --online-color: #00ff88;
}

[data-theme="light"] {
    /* Light theme */
    --container-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --card-bg: rgba(0, 0, 0, 0.05);
    --card-hover-bg: rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 0, 0, 0.1);
    --social-icon-bg: rgba(0, 0, 0, 0.08);
    --fps-bg: rgba(0, 0, 0, 0.8);
    --fps-text: white;
    --accent-color: #0984e3;
    --toast-bg: rgba(255, 255, 255, 0.95);
    --toast-text: #2d3748;
    --online-color: #00c851;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.profile-container {
    background: var(--container-bg);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.profile-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--social-icon-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 18px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    background: var(--accent-color);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fps-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--fps-bg);
    color: var(--fps-text);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 20px auto 30px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-image:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 40px;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.profile-image:hover::after {
    transform: translateX(100%);
}

.profile-name {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: var(--online-color);
    border-radius: 50%;
    position: relative;
    display: inline-block;
    box-shadow: 0 0 10px var(--online-color);
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--online-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.profile-description {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
    transition: color 0.3s ease;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-text {
    border-right: 2px solid var(--accent-color);
    padding-right: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--accent-color); }
    51%, 100% { border-color: transparent; }
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: var(--social-icon-bg);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    text-decoration: none;
    position: relative;
}

.social-icon::after {
    content: attr(data-label);
    position: absolute;
    bottom: 118%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.social-icon:hover::after { opacity: 1; }

.social-icon:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px rgba(116, 185, 255, 0.4);
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.contact-info { margin-bottom: 20px; }

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.contact-item:hover {
    background: var(--card-hover-bg);
    transform: translateY(-2px);
    color: var(--text-primary);
    cursor: pointer;
}

.contact-item i {
    font-size: 16px;
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover { text-decoration: underline; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) scale(0.98);
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid var(--border-color);
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Responsive Design */
@media (max-width: 480px) {
    .profile-container {
        padding: 30px 20px;
        margin: 10px;
        border-radius: 20px;
    }

    .profile-name { font-size: 20px; }
    .profile-description { font-size: 14px; }

    .social-icons { gap: 20px; }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Smooth animations */
.profile-container > * {
    animation: fadeInUp 0.6s ease forwards;
    animation-fill-mode: forwards; 
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform; 
}

.profile-container > *:nth-child(1) { animation-delay: 0.1s; }
.profile-container > *:nth-child(2) { animation-delay: 0.2s; }
.profile-container > *:nth-child(3) { animation-delay: 0.3s; }
.profile-container > *:nth-child(4) { animation-delay: 0.4s; }
.profile-container > *:nth-child(5) { animation-delay: 0.5s; }
.profile-container > *:nth-child(6) { animation-delay: 0.6s; }
.profile-container > *:nth-child(7) { animation-delay: 0.7s; }
.profile-container > *:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
