/* Notion-like Styles for AI Text Humanizer */

:root {
    --font-sans: "Inter", sans-serif;
    --text-color: rgb(25, 25, 24);
    --bg-color: #fafafa;
    --border-color: rgba(55, 53, 47, 0.12);
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;

    /* App specific */
    --text-color-light: rgba(25, 25, 24, 0.9);
    --sidebar-text: rgba(25, 23, 17, 0.6);
    --primary-blue: #2383E2;
    --hover-surface: rgba(55, 53, 47, 0.08);
    --card-bg: #ffffff;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-32) var(--space-24);
}

/* ========== APP HEADER ========== */
.app-header {
    text-align: center;
    margin-bottom: var(--space-24);
    padding: var(--space-16) var(--space-24);
    margin: calc(-1 * var(--space-32)) calc(-1 * var(--space-24)) var(--space-24);
}

.app-header__title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-color);
    margin: 0;
    padding-bottom: var(--space-16);
}

.app-header__title::after {
    content: "";
    display: block;
    width: 40%;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-16) auto 0;
}

/* Cards & Inputs */
.card {
    background: var(--card-bg);
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
    overflow: hidden;
}

.card-body {
    padding: 24px;
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 16px;
    font-family: "Inter", sans-serif;
    font-size: 18px;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 24px;
    color: var(--text-color-light);
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 250px;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--sidebar-text);
}

select {
    padding: 10px 12px;
    font-size: 16px;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-family: "Inter", sans-serif;
}

/* Buttons */
.primary-btn {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 50px;
    background: #000000;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    font-family: "Inter", sans-serif;
}

.primary-btn:hover {
    background: #1a1a1a;
}

.primary-btn:active {
    background: #333333;
}

.copy-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--hover-surface);
    color: var(--text-color);
    border: none;
    cursor: pointer;
}

.copy-btn:hover {
    background: rgba(55, 53, 47, 0.12);
}

/* Results Grid */
.results-section {
    margin-top: 48px;
    animation: fadeIn 0.4s ease-out;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.result-card {
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.result-header {
    padding: 16px;
    border-bottom: 0.5px solid rgba(55, 53, 47, 0.16);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0;
}

.result-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.result-text {
    font-size: 16px;
    color: var(--text-color-light);
    margin-bottom: 20px;
    white-space: pre-wrap;
    flex-grow: 1;
}

.tip-box {
    background: rgba(35, 131, 226, 0.05);
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    color: var(--primary-blue);
}

.tip-box strong {
    font-weight: 600;
}

/* Footer */
.notice-footer {
    border-top: 0.5px solid rgba(55, 53, 47, 0.16);
    padding: 32px 0;
    margin-top: 64px;
    text-align: center;
}

.notice {
    font-size: 14px;
    color: var(--sidebar-text);
    max-width: 600px;
    margin: 0 auto;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(55, 53, 47, 0.16);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--space-24) var(--space-16);
    }

    .app-header {
        padding: var(--space-12) var(--space-16);
        margin: calc(-1 * var(--space-24)) calc(-1 * var(--space-16)) var(--space-20);
    }

    .app-header__title {
        font-size: 28px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-btn {
        width: 100%;
    }
}