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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 8px;
}

header p {
    color: #7f8c8d;
}

main {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.form-group input[type="date"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.stock-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.stock-row input[type="text"] {
    flex: 2;
}

.stock-row input[type="number"] {
    flex: 1;
}

.stock-row select {
    flex: 1;
}

.btn-add {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-add:hover {
    background: #2980b9;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #c0392b;
}

.btn-submit {
    width: 100%;
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #219a52;
}

.btn-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

#result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

#result h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

#result-content {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.stock-result {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 4px;
}

.stock-result h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.stock-result p {
    margin: 5px 0;
}

.total-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

.download-buttons {
    display: flex;
    gap: 10px;
}

.btn-download {
    flex: 1;
    background: #3498db;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-download:hover {
    background: #2980b9;
}

.btn-smbs {
    background: #e67e22;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-smbs:hover {
    background: #d35400;
}

.error {
    background: #fadbd8;
    color: #c0392b;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.price-data-section,
.rate-data-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.price-data-section p,
.rate-data-section p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.table-wrapper {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.price-table,
.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.price-table th,
.price-table td,
.rate-table th,
.rate-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.price-table th,
.rate-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.price-table tr:nth-child(even),
.rate-table tr:nth-child(even) {
    background: #fafafa;
}

.price-table tr:hover,
.rate-table tr:hover {
    background: #f0f0f0;
}

/* 헤더 아래 짧은 한줄 문구 */
.disclaimer-short {
    font-size: 0.85rem;
    color: #e67e22;
    font-weight: 500;
    margin-top: 10px;
    line-height: 1.3;
}

/* Download 버튼 위 상세 문구 */
.disclaimer-main {
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    padding: 14px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #7d4900;
}

.disclaimer-main strong {
    display: block;
    margin-bottom: 8px;
    color: #d68910;
    font-size: 1rem;
}

.disclaimer-main p {
    margin: 0;
}

/* 모바일 반응형 */
@media (max-width: 480px) {
    .disclaimer-short {
        font-size: 0.8rem;
    }

    .disclaimer-main {
        padding: 12px;
        font-size: 0.9rem;
        margin: 12px 0;
    }

    .disclaimer-main strong {
        font-size: 0.95rem;
    }
}
