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

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 1280px;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 32px;
}

.logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 16px;
}

.main-logo {
    height: 80px;
    width: auto;
    max-width: 100%;
}

.heading {
    width: 100%;
    text-align: center;
}

.heading h1 {
    font-weight: 300;
    font-size: 36.4px;
    line-height: 46px;
    color: #161615;
    letter-spacing: -1.288px;
}

.heading .subtitle {
    font-weight: 300;
    font-size: 14px;
    line-height: 22px;
    color: #666666;
    margin-top: 8px;
    letter-spacing: -0.2px;
}

.background {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 80px 72px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.main-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.header-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #000000;
}

.text-label {
    font-weight: 300;
    font-size: 32px;
    line-height: 51.2px;
    color: #161615;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.textarea-container {
    background-color: #f9f9f9;
    border-bottom: 1px solid #000000;
    min-height: 90px;
    height: 262.34px;
    overflow: auto;
}

.text-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 32.6px;
    line-height: 45.7px;
    color: #161615;
    resize: none;
    padding: 8px;
}

.text-input::placeholder {
    color: #999999;
}

.bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 11px;
}

.sample-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: transparent;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s;
}

.sample-button:hover {
    border-color: #227cff;
    color: #227cff;
}

.sample-button svg {
    flex-shrink: 0;
}

.right-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.character-count {
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #888888;
}

.character-label {
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #888888;
}

.checkmark {
    font-weight: 300;
    font-size: 16px;
    line-height: 25.6px;
    color: #10b981;
}

/* Controls Row */
.controls-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 16px;
}

.model-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.model-label {
    font-weight: 400;
    font-size: 14px;
    color: #161615;
}

.model-value {
    font-weight: 400;
    font-size: 14px;
    color: #666666;
}

.hint {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 12px;
    color: #888888;
}

.generate-button {
    margin-left: auto;
    padding: 12px 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #161615;
    background: linear-gradient(135deg, #23BBB1 0%, #1A95CD 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(60, 109, 154, 0.3);
    text-align: center;
    white-space: nowrap;
}

.generate-button:hover {
    box-shadow: 0 4px 12px rgba(60, 109, 154, 0.4);
    transform: translateY(-1px);
}

.generate-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(60, 109, 154, 0.3);
}

.generate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Section */
.result-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.result-container {
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    padding: 20px 24px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #d0d0d0;
}

.result-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.model-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #227cff;
}

.device-info {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #666666;
}

.result-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.stat-value {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #161615;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: #888888;
}

.result-content {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.result-box {
    flex: 1;
    padding: 16px;
    border-radius: 8px;
    min-height: 100px;
}

.original-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.corrected-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.box-label {
    font-size: 12px;
    font-weight: 500;
    color: #666666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-icon {
    font-size: 14px;
}

.box-content {
    font-size: 18px;
    line-height: 1.7;
    color: #161615;
    word-break: keep-all;
}

.result-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #227cff;
    flex-shrink: 0;
}

/* Diff Highlight */
.diff-removed {
    color: #999999;
    text-decoration: line-through;
}

.diff-added {
    color: #227cff;
    font-weight: 500;
}

/* Copy Button */
.copy-button-container {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-button:hover {
    border-color: #227cff;
    color: #227cff;
    background-color: #f0f7ff;
}

.copy-button svg {
    flex-shrink: 0;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.loading p {
    font-size: 14px;
    color: #666666;
    margin-top: 12px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #23BBB1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Responsive Design */

@media (max-width: 768px) {
    .section {
        padding: 0 16px;
    }

    .main-logo {
        height: 60px;
    }

    .background {
        padding: 40px 24px 24px;
    }

    .heading h1 {
        font-size: 28px;
        line-height: 36px;
    }

    .heading .subtitle {
        font-size: 13px;
        line-height: 20px;
    }

    .text-label {
        font-size: 24px;
    }

    .text-input {
        font-size: 18px;
        line-height: 28px;
    }

    .textarea-container {
        height: auto;
        min-height: 200px;
    }

    .controls-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .generate-button {
        margin-left: 0;
        width: 100%;
    }

    .result-content {
        flex-direction: column;
    }

    .result-arrow {
        transform: rotate(90deg);
        padding: 8px 0;
    }

    .result-header {
        flex-direction: column;
        gap: 12px;
    }

    .result-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .stat-item {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 0 12px;
    }

    .main-logo {
        height: 50px;
    }

    .logo-container {
        margin-bottom: 12px;
    }

    .background {
        padding: 24px 16px;
    }

    .heading h1 {
        font-size: 22px;
        line-height: 30px;
        letter-spacing: -0.5px;
    }

    .heading .subtitle {
        font-size: 12px;
        line-height: 18px;
    }

    .header-container {
        padding-bottom: 12px;
    }

    .text-label {
        font-size: 20px;
        line-height: 32px;
    }

    .text-input {
        font-size: 16px;
        line-height: 24px;
    }

    .bottom-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .right-controls {
        align-self: flex-end;
    }

    .controls-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .model-info {
        width: 100%;
    }

    .hint {
        width: 100%;
    }

    .box-content {
        font-size: 16px;
    }

    .result-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }

    .copy-button-container {
        justify-content: center;
    }

    .copy-button {
        width: 100%;
        justify-content: center;
    }
}
