:root {
    --primary: #f25b30;
    --primary-hover: #e04a20;
    --success: #20c978;
    --success-hover: #1ab068;
    --facebook: #4267B2;
    --facebook-hover: #365899;
    --bg-color: #fcece7;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 20px;
}

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

.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo-text {
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
    margin-top: 12px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    stroke: var(--primary);
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.input-group input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 15px;
    outline: none;
    color: var(--text-main);
}

.paste-btn {
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    padding: 0 20px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    transition: background 0.2s;
}

.paste-btn:hover {
    background: #f5f5f5;
    color: var(--text-main);
}

.main-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    margin-bottom: 24px;
}

.main-btn:hover {
    background: var(--primary-hover);
}
.main-btn:active {
    transform: scale(0.98);
}

.main-btn:disabled {
    background: #ffa88c;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none !important;
}

#loading {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 15px;
}

.result-box {
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.status-success {
    color: var(--success);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

textarea {
    width: 100%;
    height: 80px;
    border: none;
    resize: none;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    line-height: 1.5;
    background: transparent;
    word-break: break-all;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.action-btn:hover {
    opacity: 0.9;
}

.buy-btn {
    background: var(--success);
}

.share-btn {
    background: var(--facebook);
}

/* History Section */
.history-section {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.history-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: #f9f9f9;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 12px;
}

.history-item-original {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-short {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    word-break: break-all;
    margin-bottom: 8px;
}

.history-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.history-item-actions button {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-item-actions button:hover {
    background: #e0e0e0;
    color: var(--text-main);
}
