/* Custom styles to complement Bootstrap */

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #343a40;
    --header-text: #fff;
    --dropdown-bg: #fff;
    --dropdown-text: #333;
    --link-color: #007bff;
    --link-hover-color: #0056b3;
    --social-icon-color: #333;
    --social-hover-bg: rgba(0, 0, 0, 0.1);
    --social-hover-color: #000;
    --social-link-bg: #f8f9fa;
    --social-link-border: #e0e0e0;
    --toggle-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark mode via system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #f4f4f4;
        --header-bg: #2c2c2c;
        --header-text: #f4f4f4;
        --dropdown-bg: #2c2c2c;
        --dropdown-text: #f4f4f4;
        --social-icon-color: #f4f4f4;
        --social-hover-bg: rgba(255, 255, 255, 0.2);
        --social-hover-color: #fff;
        --social-link-bg: #2c2c2c;
        --social-link-border: #404040;
        --toggle-shadow: rgba(0, 0, 0, 0.3);
    }
    
    .navbar {
        background-color: var(--header-bg) !important;
    }
    
    footer {
        background-color: var(--header-bg) !important;
        color: var(--text-color) !important;
    }
    
    .social-link[href*="tiktok"] i {
        color: #ffffff;
    }
    
    .aavalingo-icon {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* General styles */
body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    padding-top: 56px;
}

main {
    flex: 1;
}

/* Navbar styles */
.navbar {
    background-color: var(--header-bg) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--header-text);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--link-color) !important;
}

/* Dropdown menu styles */
.dropdown-menu.custom-dropdown-menu {
    background-color: var(--dropdown-bg);
    color: var(--dropdown-text);
    border: none;
}

.dropdown-menu.custom-dropdown-menu .dropdown-item {
    color: var(--dropdown-text);
}

.dropdown-menu.custom-dropdown-menu .dropdown-item:hover,
.dropdown-menu.custom-dropdown-menu .dropdown-item:focus {
    background-color: var(--social-hover-bg);
    color: var(--social-hover-color);
}


/* Main Content Layout */
.main-content {
    min-height: calc(100vh - 112px);
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Layout */
.mobile-layout {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.social-links-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-section-mobile {
    text-align: center;
}

.profile-section-mobile .profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--social-link-border);
}

.profile-section-mobile h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.profile-section-mobile p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Desktop Layout */
.desktop-layout {
    width: 100%;
    max-width: 1000px;
    gap: 4rem;
    align-items: flex-start;
}

.profile-section-desktop {
    flex: 0 0 300px;
    text-align: center;
    position: sticky;
    top: 100px;
}

.profile-section-desktop .profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--social-link-border);
}

.profile-section-desktop h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.profile-section-desktop p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.social-links-desktop {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 2rem;
}

/* Social Links Styling */
.social-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--social-link-bg);
    border: 2px solid var(--social-link-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-link:hover {
    text-decoration: none;
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--toggle-shadow);
    border-color: var(--link-color);
}

.social-link i {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
}

.social-link span {
    font-size: 1.1rem;
}

/* Classic Phone Ringing Animation */
@keyframes phoneRinging {
    0%, 75% { 
        transform: rotate(0deg) scale(1); 
    }
    76%, 82% { 
        transform: rotate(-2deg) scale(1.01); 
    }
    78%, 84% { 
        transform: rotate(2deg) scale(1.01); 
    }
    80%, 86% { 
        transform: rotate(-2deg) scale(1.01); 
    }
    88%, 100% { 
        transform: rotate(0deg) scale(1); 
    }
}

.phone-ringing-animation {
    animation: phoneRinging 3s ease-in-out infinite;
    transform-origin: center center;
}

.phone-ringing-animation:hover {
    animation-play-state: paused;
    transform: translateY(-2px) rotate(0deg);
    box-shadow: 0 4px 12px var(--toggle-shadow);
    border-color: var(--link-color);
}

/* Platform-specific colors */
.social-link[href*="youtube"] i {
    color: #FF0000;
}

.social-link[href*="tiktok"] i {
    color: #000000;
}


.social-link[href*="instagram"] i {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-link[href*="aavalingo"] i {
    color: var(--link-color);
}

/* AavaLingo Brand Styling */
.aavalingo-link {
    background: linear-gradient(135deg, rgba(255, 127, 80, 1) 0%, rgba(255, 165, 0, 1) 50%, rgba(255, 69, 0, 1) 100%) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 165, 0, 0.8) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 127, 80, 0.3);
}

.aavalingo-link:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(255, 69, 0, 1) 0%, rgba(255, 127, 80, 1) 50%, rgba(255, 165, 0, 1) 100%) !important;
    border-color: rgba(255, 69, 0, 0.9) !important;
    box-shadow: 0 6px 20px rgba(255, 127, 80, 0.4);
    transform: translateY(-2px);
}

.aavalingo-icon {
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 2px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}


/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
    .aavalingo-link {
        background: linear-gradient(135deg, rgba(255, 127, 80, 0.95) 0%, rgba(255, 165, 0, 0.95) 50%, rgba(255, 69, 0, 0.95) 100%) !important;
    }
    
    .aavalingo-icon {
        background: rgba(255, 255, 255, 0.4) !important;
    }
}

/* Firefox fallback for backdrop-filter */
@-moz-document url-prefix() {
    .aavalingo-link {
        background: linear-gradient(135deg, rgba(255, 127, 80, 0.95) 0%, rgba(255, 165, 0, 0.95) 50%, rgba(255, 69, 0, 0.95) 100%) !important;
    }
    
    .aavalingo-icon {
        background: rgba(255, 255, 255, 0.4) !important;
    }
}

/* Footer styles */
footer {
    background-color: var(--footer-bg) !important;
    color: var(--footer-text);
}

.visitor-counter {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive styles */
@media (max-width: 991px) {
    .navbar-nav {
        padding-top: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.25rem 0;
    }
}

@media (max-width: 768px) {
    
    .main-content {
        padding: 1rem;
    }
    
    .mobile-layout {
        max-width: 100%;
    }
    
    .profile-section-mobile .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .social-link {
        padding: 0.8rem 1rem;
    }
    
    .social-link i {
        font-size: 1.3rem;
        margin-right: 0.8rem;
    }
    
    .social-link span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-section-mobile .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .profile-section-mobile h2 {
        font-size: 1.3rem;
    }
    
    .social-link {
        padding: 0.7rem 0.8rem;
    }
    
    .social-link i {
        font-size: 1.2rem;
        margin-right: 0.7rem;
    }
    
    .social-link span {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .desktop-layout {
        gap: 3rem;
    }
    
    .profile-section-desktop {
        flex: 0 0 280px;
    }
    
    .profile-section-desktop .profile-image {
        width: 180px;
        height: 180px;
    }
}

@media (min-width: 1200px) {
    .desktop-layout {
        gap: 5rem;
    }
    
    .profile-section-desktop {
        flex: 0 0 320px;
    }
    
    .profile-section-desktop .profile-image {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 767px) {
    footer .row > div {
        text-align: center !important;
    }
    
    footer .row > div:first-child {
        margin-bottom: 0.5rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .phone-ringing-animation {
        animation: none;
    }
    
    .social-link:hover {
        transform: none;
    }
}

#hacker-terminal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    color: #00ff00;
    font-family: "Courier New", Courier, monospace;
    padding: 20px;
    z-index: 9999;
    overflow-y: auto;
    white-space: pre-wrap;
}

#hacker-terminal .terminal-output {
    white-space: pre-wrap;
}

#hacker-terminal.active {
    display: block; /* Show terminal when active */
}