:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --bg-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --error-color: #ff4757;
    --input-bg: rgba(255, 255, 255, 0.05);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
    color: var(--text-color);
    padding: 20px;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

/* Password Screen Styles */
#password-screen {
    text-align: center;
    display: none;
    flex-direction: column;
    gap: 20px;
}

#password-screen.active {
    display: flex;
}

#password-screen h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="password"],
textarea {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 15px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="password"]:focus,
textarea:focus {
    border-color: var(--primary-color);
}

button {
    padding: 15px 30px;
    border-radius: var(--border-radius);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

#login-btn,
.primary-btn {
    background: var(--primary-color);
    color: white;
}

#login-btn:hover,
.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

#login-btn:active,
.primary-btn:active {
    transform: translateY(0);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 10px;
}

.hidden {
    display: none !important;
}

/* Main App Screen Styles */
#main-app-screen {
    display: none;
    flex-direction: column;
    gap: 20px;
}

#main-app-screen.active {
    display: flex;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

header h1 {
    font-size: 1.5rem;
}

.close-icon {
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.query-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

textarea {
    width: 100%;
    min-height: 120px;
    resize: none;
}

.btn-row {
    display: flex;
    justify-content: flex-end;
}

.results-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.results-placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 80px;
}

.app-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Loader Styles */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 40px auto 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results-container p {
    text-align: center;
}

.error strong {
    color: var(--error-color);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .glass-container {
        padding: 20px;
        max-width: 100%;
    }

    #password-screen h1 {
        font-size: 1.5rem;
    }
}