:root {
    --bg-color: #f4f4f4;
    --container-bg: rgba(255,255,255,0.9);
    --text-color: #333;
    --link-bg: #e0e0e0;
    --link-text: #333;
    --link-hover-bg: #333;
    --link-hover-text: #fff;
    --icon-color: #333;
    --icon-hover-color: #007bff;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg: rgba(30,30,30,0.95);
    --text-color: #f4f4f4;
    --link-bg: #2a2a2a;
    --link-text: #f4f4f4;
    --link-hover-bg: #007bff;
    --link-hover-text: #fff;
    --icon-color: #f4f4f4;
    --icon-hover-color: #00ffe7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}

.video-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #111; /* fallback color */
    transition: background-image .3s ease, opacity .3s ease;
    background-size: cover;
    background-position: center;
}
.video-background.image-bg { /* offline */
    background-image: url('../assets/tenor.gif');
}

.video-background iframe {
    position: absolute;
    top: 30%; /* move video down */
    left: 50%;
    width: 100vw;     /* fill viewport width */
    height: 56.25vw;  /* keep 16:9 ratio */
    transform: translate(-50%, -25%); /* counter horizontal + vertical offset */
    border: 0;
}

#twitch-embed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    will-change: width,height,transform;
}

.container {
    position: relative;
    z-index: 2;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    width: 90%;
    max-width: 400px;
    margin: 2rem auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.top-left, .top-right {
    position: absolute;
    top: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--icon-color);
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.top-left {
    left: 15px;
}

.top-right {
    right: 15px;
}

.top-left:hover, .top-right:hover {
    color: var(--icon-hover-color);
    background: rgba(0,123,255,0.1);
}

body.dark-mode .container {
    background-color: rgba(30, 30, 30, 0.95);
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--icon-hover-color);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.description {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.4;
}

.icon-tab {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-tab a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--link-bg);
    transition: all 0.3s ease;
    text-decoration: none;
}

.icon-tab a:hover {
    background: var(--link-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.icon-tab a i {
    font-size: 1.8rem;
    color: var(--icon-color);
    transition: transform 0.3s, color 0.3s;
}

.icon-tab a:hover i {
    transform: scale(1.2);
    color: var(--link-hover-text);
}

.links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--link-bg);
    color: var(--link-text);
    padding: 1rem;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s, transform 0.3s, color 0.3s;
    border: 1px solid transparent;
    cursor: pointer;
}

.link-item:hover {
    background: var(--link-hover-bg);
    color: var(--link-hover-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--icon-hover-color);
}

.link-item a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    transition: color 0.3s;
}

.link-menu {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    background: var(--container-bg);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    min-width: 130px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.link-menu.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

.link-menu button {
    background: none;
    border: none;
    padding: 0.8rem 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.link-menu button:hover {
    background: var(--link-hover-bg);
    color: var(--link-hover-text);
}

.contact {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.contact a {
    color: var(--icon-hover-color);
    text-decoration: none;
    font-weight: 500;
}

.contact a:hover {
    text-decoration: underline;
}

.copy-tooltip {
    position: absolute;
    top: 40px;
    right: 0;
    background: #333;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
    white-space: nowrap;
    transform: translateX(50%);
}

.copy-tooltip.show {
    opacity: 1;
}

.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 280px;
    max-width: 350px;
}

.custom-alert.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-alert.success {
    border-left: 4px solid #10b981;
}

.custom-alert.warning {
    border-left: 4px solid #f59e0b;
}

.custom-alert .alert-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.custom-alert.success .alert-icon {
    color: #10b981;
}

.custom-alert.warning .alert-icon {
    color: #f59e0b;
}

.custom-alert .alert-content {
    flex: 1;
}

.custom-alert .alert-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.custom-alert .alert-message {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.3;
}

.custom-alert .alert-close {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    margin-left: 0.5rem;
}

.custom-alert .alert-close:hover {
    opacity: 1;
}

.footer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .icon-tab {
        gap: 1rem;
    }
    
    .icon-tab a {
        width: 45px;
        height: 45px;
    }
}