:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary-color: #f72585;
    --text-color: #2b2d42;
    --text-light: #8d99ae;
    --background-color: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.85);
    --success-color: #06d6a0;
    --error-color: #ef476f;
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 900px;
    padding: 40px;
    margin: 40px auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 8px;
}

.search-section {
    margin-bottom: 30px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 10px;
    position: relative;
}

input[type="text"] {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.pulse-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 25px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    white-space: nowrap;
}

.pulse-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.button-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.pulse-button:hover .button-icon {
    transform: translateX(4px);
}

.pulse-button:disabled {
    background-color: #cbd5e1;
    color: #ffffff;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.6;
}

.results-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary-color);
    margin-right: 10px;
    border-radius: 4px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 200px;
    word-break: break-word;
}

.placeholder-text {
    color: var(--text-light);
    text-align: center;
    padding: 30px 0;
}

.hint {
    font-size: 0.85rem;
    margin-top: 10px;
    opacity: 0.7;
}

.json-container {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.json-output {
    color: #e2e8f0;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow-x: auto;
    padding: 25px;
    min-height: 200px;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-radius: 12px;
    line-height: 1.5;
}

.error {
    color: var(--error-color);
    font-weight: 600;
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.error::before {
    content: "❌";
    margin-right: 8px;
}

.success {
    color: var(--success-color);
    font-weight: 600;
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.success::before {
    content: "✅";
    margin-right: 8px;
}

hr {
    border: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 15px 0;
}

.app-footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Animation for loading state */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

.copy-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.3s;
    z-index: 10;
}

.copy-icon:hover {
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 25px;
    }

    .app-header h1 {
        font-size: 1.8rem;
    }

    .input-group {
        flex-direction: column;
    }

    .pulse-button {
        width: 100%;
    }
}

.copy-icon img {
    content: url("img/copy.svg");
    width: 20px;
    height: 20px;
    transition: filter 0.3s ease;
}

.copy-icon:hover img {
    content: url("img/copy-hover.svg");
}
.auth-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

.auth-button {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-info {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.credits {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--primary-dark);
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button.primary {
    background: var(--primary-color);
    color: white;
}

.modal-button.primary:hover {
    background: var(--primary-dark);
}

.modal-button.secondary {
    background: #f1f5f9;
    color: var(--text-color);
}

.modal-button.secondary:hover {
    background: #e2e8f0;
}

.error-message {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}