:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --success-color: #238636;
    --danger-color: #da3633;
    --warning-color: #d29922;
    --glass-bg: rgba(22, 27, 34, 0.8);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* Container */
.container {
    max-width: 1100px;
    /* Increased width */
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Chat UI */
.chat-container {
    height: 70vh;
    min-height: 520px;
    /* Added min-height */
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    font-size: 0.95rem;
    position: relative;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    /* Align to right */
    background: var(--accent-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.message.bot {
    align-self: flex-start;
    /* Align to left */
    background: #30363d;
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.typing-indicator {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: none;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
}

textarea {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    resize: none;
    height: 45px;
    outline: none;
}

textarea:focus {
    border-color: var(--accent-color);
}

button {
    padding: 0.6rem 1.2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

button:hover {
    background: var(--accent-hover);
}

button.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Disclaimer */
.disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* Tools Layout */
.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    height: auto;
}

.result-area {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: none;
}

.risk-meter {
    height: 10px;
    background: #30363d;
    border-radius: 5px;
    margin: 1rem 0;
    overflow: hidden;
}

.risk-fill {
    height: 100%;
    width: 0%;
    transition: width 1s ease;
}

/* About Page */
.about-section {
    margin-bottom: 3rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
    background: var(--card-bg);
    box-shadow: 0 0 25px rgba(88, 166, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(88, 166, 255, 0.5);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* Focus on the face */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .chat-container {
        height: 80vh;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Password Tool Styles */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
}

.strength-label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.ai-toggle-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

select {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    outline: none;
}

select:focus {
    border-color: var(--accent-color);
}

/* Hacker Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: opacity 1s ease, visibility 1s ease;
}

#intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.terminal-content {
    max-width: 600px;
    width: 100%;
    text-shadow: 0 0 5px #0f0;
}

.terminal-line {
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    min-height: 1.2rem;
    font-size: 1.1rem;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.03),
            rgba(0, 255, 0, 0.01),
            rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10001;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background: #0f0;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.skip-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.8rem;
    text-shadow: 0 0 5px #0f0;
    transition: background 0.3s;
    z-index: 10002;
}

.skip-btn:hover {
    background: rgba(0, 255, 0, 0.1);
}
.top-branding {
    font-size: 0.6rem;
    padding: 2px 5%;
    color: var(--text-secondary);
    background: #0d1117;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
    font-weight: 500;
    text-transform: uppercase;
}
