/* 
* AI SquadX - Style Guide
* Deep Dark Futuristic Theme
*/

:root {
    /* Color Palette */
    --bg-main: #0B0E14;
    --surface-card: #1A1D23;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    
    /* Accent Colors (Neon Gradient) */
    --color-pink: #FF10F0;
    --color-purple: #8B5DFF;
    --gradient-neon: linear-gradient(135deg, var(--color-pink), var(--color-purple));

    /* Transition Speeds */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.35s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Sizing */
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif; /* Assuming modern font usage */
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--color-pink);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-purple);
}

/* --- Global Utility Classes --- */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.text-secondary {
    color: var(--text-secondary);
}

/* --- Buttons & Interactivity --- */

.neon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--gradient-neon);
    color: var(--text-primary);
    transition: all var(--transition-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-btn:hover {
    box-shadow: 0 0 15px var(--color-pink), 0 0 30px var(--color-purple);
    transform: translateY(-2px);
}

.neon-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 5px var(--color-pink);
}

/* --- Header & Navigation --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 35px;
    height: 35px;
    background: var(--gradient-neon);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 16, 240, 0.7);
}

.site-title {
    font-size: 1.7rem;
    font-weight: 900;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons a {
    font-size: 1.3rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.social-icons a:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--color-purple);
}

/* Hamburger Menu Styling (Mobile First Hidden) */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    z-index: 105;
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-main);
    z-index: 101;
    transform: translateX(100%);
    transition: transform var(--transition-medium);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* --- Toggle Switch (For Dark Mode/Other Settings) --- */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: var(--transition-fast);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-secondary);
    transition: var(--transition-fast);
}

input:checked + .slider {
    background: var(--gradient-neon);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--color-pink);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: var(--text-primary);
}

.slider.round {
    border-radius: 34px;
}


/* --- Tool Grid Section --- */
#main-content {
    padding: 40px 0;
    min-height: calc(100vh - var(--header-height) - 80px); /* Account for header/footer */
}

#tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-top: 20px;
}

/* --- Tool Card Styling --- */
.tool-card {
    background: var(--surface-card);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), border var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(139, 93, 255, 0.3);
    border-color: var(--color-purple);
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.card-image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Aspect Ratio Definitions */
.ratio-1-1 {
    padding-top: 100%; /* 1:1 Square */
}
.ratio-9-16 {
    padding-top: 177.77%; /* 9:16 Vertical */
}

.card-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tool-card:hover .card-thumbnail {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 10px;
    color: var(--text-primary);
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    max-height: 50px; /* Default collapsed height */
    overflow: hidden;
    position: relative;
}

.description-fade {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to top, var(--surface-card), transparent);
}

.description-expanded {
    max-height: none;
    overflow: visible;
}
.description-expanded .description-fade {
    display: none;
}


.toggle-desc-btn {
    align-self: flex-start;
    margin-top: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-pink);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: color var(--transition-fast);
}
.toggle-desc-btn:hover {
    color: var(--color-purple);
}


/* --- Skeleton Loading --- */
.skeleton-card {
    background: var(--surface-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skeleton-image {
    width: 100%;
    padding-top: 100%; /* Default to 1:1 for visual consistency */
    position: relative;
    background-color: #282b33; /* Darker shade for skeleton */
}

.skeleton-text-line {
    height: 15px;
    background-color: #282b33;
    margin-top: 10px;
    border-radius: 4px;
}
.skeleton-text-line:nth-child(2) {
    width: 80%;
}
.skeleton-text-line:nth-child(3) {
    width: 95%;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer-effect {
    background: linear-gradient(
        90deg,
        #1A1D23 0%,
        #282B33 20%,
        #1A1D23 40%,
        #1A1D23 100%
    );
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-card .shimmer-effect {
    animation-delay: 0.1s;
}
/* Apply shimmer to skeleton specific elements */
.skeleton-card .skeleton-image.shimmer-effect {
    background-color: unset; /* Let gradient define color */
}
.skeleton-card .skeleton-text-line.shimmer-effect {
    background-color: unset;
}


/* --- Footer --- */
footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- Modals & Overlays (General) --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 14, 20, 0.9);
    z-index: 200;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
    backdrop-filter: blur(5px);
}

.overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface-card);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Password Overlay Specific --- */
#password-overlay {
    z-index: 500;
}

#password-overlay.active {
    display: flex;
}

#password-overlay .modal-content {
    max-width: 400px;
}

/* --- Notification System --- */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--surface-card);
    border-radius: 10px;
    color: var(--text-primary);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateX(150%);
    opacity: 0;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
    border-left: 5px solid;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.error {
    border-left-color: #D9534F; /* Red */
}
.notification.success {
    border-left-color: #5CB85C; /* Green */
}
.notification.info {
    border-left-color: var(--color-purple);
}


/* --- Responsive Design --- */

/* Tablet */
@media (max-width: 1024px) {
    #tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .site-title {
        font-size: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-right {
        display: none; /* Hide links/toggle, rely on hamburger menu */
    }
    
    .header-content {
        padding: 0 15px;
    }

    header {
        height: var(--header-height);
    }
    
    #main-content {
        padding: 20px 0;
    }

    #tool-grid {
        gap: 20px;
        padding: 0 15px;
    }

    .tool-card {
        border-radius: 10px;
    }

    .card-title {
        font-size: 1.1rem;
    }
    
    /* Mobile Menu visibility handled by JS class on .mobile-menu */
    .mobile-menu {
        /* Styles defined above */
    }

    .notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        transform: translateX(150%); /* Hidden off screen to the right */
    }
    .notification.show {
        transform: translateX(0);
    }

}