:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(22, 27, 34, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --input-bg: rgba(13, 17, 23, 0.7);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: #a855f7;
    --error-color: #ef4444;
    --success-color: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background animated blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(13, 17, 23, 0) 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(13, 17, 23, 0) 70%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.brand-logo {
    height: 96px;
    width: auto;
    object-fit: contain;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    animation: fadeIn 1s ease-out;
}

@media (min-width: 900px) {
    .grid-layout {
        grid-template-columns: 4fr 6fr;
        transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .grid-layout.form-collapsed {
        grid-template-columns: 0fr 1fr;
    }
}

.input-section {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.input-section.collapsed {
    opacity: 0;
    padding: 0;
    margin: 0;
    border: none;
    transform: translateX(-20px);
}


.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

input,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

input::placeholder {
    color: rgba(139, 148, 158, 0.5);
}

input:focus,
select:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "▼";
    font-size: 0.7rem;
    color: var(--text-secondary);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

select {
    appearance: none;
    cursor: pointer;
}

select option {
    background: var(--bg-color);
    color: var(--text-primary);
}

.primary-btn {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

.error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-align: center;
}

/* Output Section */
.output-section {
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--panel-border);
}

.output-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.output-content {
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(13, 17, 23, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--panel-border);
    min-height: 300px;
}

.output-content.empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-icon {
    opacity: 0.5;
}

/* Markdown Generated Styles */
.output-content h1,
.output-content h2,
.output-content h3 {
    color: var(--text-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.output-content h1:first-child,
.output-content h2:first-child {
    margin-top: 0;
}

.output-content p {
    margin-bottom: 1em;
}

.output-content ul,
.output-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.output-content li {
    margin-bottom: 0.5em;
}

.output-content strong {
    color: #fff;
}

/* Table styles for Calendar */
.output-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.output-content th,
.output-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--panel-border);
    text-align: left;
}

.output-content th {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
}

.output-content tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* App Footer */
.app-footer {
    width: 100%;
    text-align: center;
    padding: 2rem 1rem 1rem;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.app-footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}