@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=Protest+Guerrilla&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bungee&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, rgb(176, 91, 167), rgb(105, 125, 255));
    --name-gradient: linear-gradient(to bottom, #fff700, #ffba08);
    --va-gradient: linear-gradient(to bottom, #a2d2ff, #5fa8ff);
    --panel-bg: rgba(0, 0, 0, 0.45);
    --card-bg: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-muted: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 40px 300px 20px 300px;
    position: relative;
    background-color: #0b0b12;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 280px;
    width: calc(100% - 560px);
    padding: 20px 40px;
    z-index: 1000;
}

.left.side {
    font-family: "Protest Guerrilla", sans-serif;
    font-size: 28px;
    letter-spacing: 2px;
    color: #ffffff;
}

.right.side {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 16px;
}



#historyPanel {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px 20px;
    overflow-y: auto;
    z-index: 1010;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

#responsePanel {
    position: fixed;
    right: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px 20px;
    overflow-y: auto;
    z-index: 1010;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.side-mini-logo {
    width: 70px;
    height: auto;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0 0 10px rgba(166, 86, 158, 0.4));
}

.history-header, .response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-height: 26px;
}

#historyPanel h3, #responsePanel h3 {
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
}

#clearHistoryBtn {
    background: rgba(255, 75, 75, 0.15);
    color: #ff4b4b;
    border: 1px solid rgba(255, 75, 75, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#clearHistoryBtn:hover {
    background: rgba(255, 75, 75, 0.3);
    transform: scale(1.05);
}

#historyList {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#historyList li {
    color: #ffffff;
    padding: 10px 14px;
    background: var(--card-bg);
    border-radius: 12px;
    word-wrap: break-word;
    font-family: "Poppins", sans-serif;
    font-size: 13.5px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

#historyList li:hover {
    background: rgba(255, 255, 255, 0.12);
}

.history-text {
    flex: 1;
    cursor: pointer;
}

.delete-item-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.delete-item-btn:hover {
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.15);
}

#responseText {
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    word-wrap: break-word;
}

#logo {
    width: 420px;
    max-width: 85vw;
    margin-bottom: -40px;
    filter: drop-shadow(0 0 25px rgba(166, 86, 158, 0.45));
    animation: float 4s ease-in-out infinite;
}

h1 {
    font-family: "Bungee", sans-serif;
    color: #ffffff;
    text-align: center;
    line-height: 1.25;
    max-width: 950px;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

#name {
    font-family: "Protest Guerrilla", sans-serif;
    background: var(--name-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 60px;
    text-shadow: 0 0 15px rgba(255, 214, 0, 0.3);
}

#va {
    font-family: "Protest Guerrilla", sans-serif;
    background: var(--va-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 60px;
    text-shadow: 0 0 15px rgba(120, 180, 255, 0.3);
}

#voice {
    width: 180px;
    display: none;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

#textInputContainer {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 450px;
}

#textInput {
    flex: 1;
    padding: 16px 22px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    outline: none;
    font-size: 15px;
    font-family: "Poppins", sans-serif;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: border-color 0.3s ease, background 0.3s ease;
}

#textInput:focus {
    border-color: rgb(176, 91, 167);
    background: rgba(255, 255, 255, 0.12);
}

#textInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#sendBtn {
    padding: 16px 28px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: "Google Sans", sans-serif;
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(105, 125, 255, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#sendBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 91, 167, 0.4);
}

#sendBtn:active {
    transform: translateY(0);
}

#btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: fit-content;
    min-width: 260px;
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    background: var(--primary-gradient);
    color: #ffffff;
    font-family: "Google Sans", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(176, 91, 167, 0.4), 0 0 30px rgba(105, 125, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, letter-spacing 0.3s ease;
}

#btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#btn:hover {
    transform: translateY(-3px) scale(1.02);
    letter-spacing: 1px;
    box-shadow: 0 0 28px rgba(176, 91, 167, 0.6), 0 0 40px rgba(105, 125, 255, 0.45);
}

#btn:active {
    transform: scale(0.98);
}

footer {
    margin-top: 50px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

footer p {
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.social-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    cursor: pointer;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.15));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.25) translateY(-2px);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@media(max-width: 1200px) {
    body {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 100px;
    }
    nav {
        left: 0;
        width: 100%;
        padding: 20px;
    }
    #historyPanel {
        width: 50%;
        height: 220px;
        top: auto;
        bottom: 0;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    #responsePanel {
        width: 50%;
        height: 220px;
        top: auto;
        bottom: 0;
        left: 50%;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    .side-mini-logo {
        display: none;
    }
    body {
        padding-bottom: 260px;
    }
}

@media(max-width: 768px) {
    #logo { order: 1; }
    h1 { order: 2; }
    #voice { order: 3; }
    #toolsSection { order: 4; }

    #historyPanel, #responsePanel {
        order: 5;
        width: 100%;
        max-height: 180px;
        position: static;
        border-radius: 14px;
        margin-bottom: 12px;
        padding: 18px 16px;
    }

    #textInputContainer { order: 6; }
    #btn { order: 7; }
    footer { order: 8; }

    body {
        padding-bottom: 20px;
    }
    .left.side {
        font-size: 22px;
    }
    .right.side {
        font-size: 14px;
    }
    #logo {
        width: 280px;
        margin-bottom: -25px;
    }
    h1 {
        font-size: 1.5rem;
        padding: 0 10px;
    }
    #name, #va {
        font-size: 2.2rem;
    }
    #textInputContainer {
        width: 90%;
        flex-direction: column;
        gap: 10px;
    }
    #textInput {
        width: 100%;
    }
    #sendBtn {
        width: 100%;
    }
    #btn {
        width: 90%;
        min-width: unset;
        font-size: 1rem;
        padding: 14px 20px;
    }
    #voice {
        width: 140px;
    }
    footer p {
        font-size: 12px;
        text-align: center;
    }
}



#toolsSection {
    width: 100%;
    max-width: 1100px;
    margin: 60px auto 20px auto;
    text-align: center;
    padding: 0 20px;
}

.tools-heading {
    font-family: "Bungee", sans-serif;
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.tools-subheading {
    font-family: "Poppins", sans-serif;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 35px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 26px 22px;
    text-align: left;
    cursor: pointer;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.25s ease, border-color 0.25s ease,
                box-shadow 0.3s ease;
}

.tool-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.tool-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(176, 91, 167, 0.4);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(176, 91, 167, 0.15);
}

.tool-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tool-card:hover .tool-icon {
    transform: scale(1.08) rotate(-3deg);
}

.tool-icon svg {
    width: 22px;
    height: 22px;
}

.tool-card h3 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #ffffff;
    font-size: 15.5px;
    margin-bottom: 8px;
}

.tool-card p {
    font-family: "Poppins", sans-serif;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

@media(max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tools-heading {
        font-size: 1.4rem;
    }
}
.tool-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tool-modal-overlay.active {
    display: flex;
}

.tool-modal {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    background: #14141c;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tool-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tool-modal-header h3 {
    font-family: "Poppins", sans-serif;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.tool-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.tool-modal-close:hover {
    color: #ff4b4b;
}

.tool-modal-body {
    padding: 22px;
    overflow-y: auto;
    font-family: "Poppins", sans-serif;
}

.tool-field {
    margin-bottom: 16px;
}

.tool-field label {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.tool-field input[type="text"],
.tool-field textarea,
.tool-field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 13.5px;
    outline: none;
    resize: vertical;
}

.tool-field input[type="text"]:focus,
.tool-field textarea:focus,
.tool-field select:focus {
    border-color: rgb(176, 91, 167);
}

.tool-field select option {
    background: #14141c;
}

.tool-field input[type="file"] {
    width: 100%;
    color: var(--text-muted);
    font-size: 13px;
}

.tool-submit-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #ffffff;
    font-family: "Google Sans", sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.tool-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tool-result {
    margin-top: 18px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #ffffff;
    font-size: 13.5px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.tool-error {
    margin-top: 14px;
    color: #ff4b4b;
    font-size: 13px;
}

.quiz-question {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.quiz-question:last-child {
    border-bottom: none;
}

.quiz-question p.q-text {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 10px;
}

.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.quiz-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
}

.quiz-option:disabled {
    cursor: default;
}

.quiz-option.correct {
    border-color: #4caf50;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.quiz-option.incorrect {
    border-color: #ff4b4b;
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.1);
}
.tool-field input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tool-field input[type="file"]:hover {
    border-color: rgba(176, 91, 167, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.tool-field input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary-gradient);
    color: #ffffff;
    font-family: "Google Sans", sans-serif;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tool-field input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
}
#newChatBtn {
    background: rgba(105, 125, 255, 0.15);
    color: #a2b4ff;
    border: 1px solid rgba(105, 125, 255, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#newChatBtn:hover {
    background: rgba(105, 125, 255, 0.3);
    transform: scale(1.05);
}
#cursorSpotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}
#toolsHeaderCanvasWrap {
    position: relative;
    padding: 50px 20px 40px 20px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 24px;
}

#toolsDotsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#toolsHeaderCanvasWrap .tools-heading,
#toolsHeaderCanvasWrap .tools-subheading {
    position: relative;
    z-index: 2;
}

.tools-heading {
    font-family: "Bungee", sans-serif;
    color: #ffffff;
    font-size: 2rem;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.tools-subheading {
    font-family: "Poppins", sans-serif;
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
    margin-bottom: 0;
}
.tools-grid {
    perspective: 1400px;
}

.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.tilt-card-inner {
    position: relative;
    transform-style: preserve-3d;
}

.tilt-card .tool-icon {
    transform: translateZ(35px);
}

.tilt-card h3 {
    transform: translateZ(25px);
}

.tilt-card p {
    transform: translateZ(15px);
}

.tilt-shine {
    position: absolute;
    inset: -26px -22px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 18px;
}

.tilt-card:hover .tilt-shine {
    opacity: 1;
}
#featuresSection {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto 60px auto;
    padding: 50px 20px;
    text-align: center;
    overflow: visible;
}

#constellationCanvas {
    position: absolute;
    top: -40px;
    left: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    pointer-events: none;
    z-index: 0;
}

.features-header {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.features-heading {
    font-family: "Bungee", sans-serif;
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.features-subheading {
    font-family: "Poppins", sans-serif;
    color: var(--text-muted);
    font-size: 14px;
}

.features-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.features-header {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.features-header.visible {
    opacity: 1;
    transform: translateY(0);
}
.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 18px;
    text-align: left;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.3s ease, border-color 0.3s ease;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(105, 125, 255, 0.35);
}

.feature-card h3 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 8px;
}

.feature-card p {
    font-family: "Poppins", sans-serif;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

@media(max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
    .features-heading {
        font-size: 1.4rem;
    }
}

@media(max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}
