* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
}

header {
    background: #2c3e50;
    color: #fff;
    padding: 25px 30px;
    border-bottom: 3px solid #1a252f;
}

h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.info-box {
    background: #34495e;
    padding: 12px 18px;
    display: inline-block;
    border-left: 3px solid #3498db;
}

.info-box p {
    margin: 3px 0;
    font-size: 0.95rem;
    color: #ecf0f1;
}

.info-box strong {
    color: #fff;
    font-weight: 600;
}

main {
    padding: 25px 30px;
}

.calculator-section {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 25px;
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.calc-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.input-with-copy {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-with-copy input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #ccc;
    font-size: 1.1rem;
    transition: border-color 0.2s;
}

.input-with-copy input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.copy-btn {
    padding: 10px 12px;
    background: #ecf0f1;
    border: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.copy-btn:hover {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.button-group {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.clear-btn {
    padding: 10px 24px;
    background: #95a5a6;
    color: #fff;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: #7f8c8d;
}

/* Result Section */
.result-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 25px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.result-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.result-item:hover {
    background: #f0f7fc;
    border-color: #3498db;
}

.result-item.highlight {
    background: #e8f4fc;
    border-color: #3498db;
}

.result-item.highlight:hover {
    background: #d4ecfa;
}

.result-item .label {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.result-item .value {
    color: #222;
    font-size: 1.3rem;
    font-weight: 600;
}

.result-item.highlight .value {
    color: #2980b9;
}

.result-item .copy-hint {
    font-size: 0.75rem;
    color: #999;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.result-item:hover .copy-hint {
    opacity: 1;
}

.copy-all-wrapper {
    margin-top: 15px;
    text-align: center;
}

.copy-all-btn {
    padding: 10px 30px;
    background: #3498db;
    color: #fff;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-all-btn:hover {
    background: #2980b9;
}

/* Table Section */
.table-section {
    background: #fff;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.table-info {
    background: #f8f9fa;
    padding: 12px 15px;
    border-left: 3px solid #6c757d;
    margin-bottom: 15px;
}

.table-info p {
    color: #555;
    margin: 3px 0;
    font-size: 0.9rem;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid #ddd;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

thead {
    background: #34495e;
    color: #fff;
}

th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    border-right: 1px solid #4a6278;
}

th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background 0.15s;
}

tbody tr:hover {
    background-color: #e8f4fc;
}

tbody tr:nth-child(even) {
    background-color: #fafafa;
}

tbody tr:nth-child(even):hover {
    background-color: #e8f4fc;
}

td {
    padding: 12px 15px;
    text-align: right;
    font-size: 0.9rem;
    border-right: 1px solid #eee;
    font-family: "Consolas", "Monaco", monospace;
}

td:last-child {
    border-right: none;
}

td:first-child {
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
}

td:last-child {
    font-weight: 600;
    color: #c0392b;
}

/* Notice Section */
.notice-section {
    background: #fffbe6;
    border: 1px solid #e6d8a8;
    border-left: 4px solid #d4a017;
    padding: 20px;
    margin: 0 30px 25px 30px;
}

.notice-section h2 {
    color: #5d4e00;
    margin-bottom: 12px;
    font-size: 1.1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.notice-content p {
    color: #665500;
    margin: 8px 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.notice-content strong {
    color: #4a4000;
}

.notice-content .warning {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #d4a017;
    color: #8b6914;
}

/* Footer */
footer {
    background: #f8f9fa;
    text-align: center;
    padding: 15px 20px;
    color: #777;
    font-size: 0.85rem;
    border-top: 1px solid #ddd;
}

/* Home Link */
.home-link {
    display: inline-block;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-weight: 500;
}

.home-link:hover {
    opacity: 1;
    color: #fff;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2c3e50;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.3rem;
    }

    header {
        padding: 20px;
    }

    main {
        padding: 15px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-item .value {
        font-size: 1.2rem;
    }

    .notice-section {
        margin: 0 15px 20px 15px;
    }

    .table-wrapper {
        overflow-x: scroll;
    }

    table {
        min-width: 400px;
    }

    th, td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .input-with-copy input {
        font-size: 1rem;
        padding: 10px 12px;
    }

    .copy-btn {
        padding: 8px 10px;
    }

    .result-item {
        padding: 12px;
    }

    .result-item .value {
        font-size: 1.1rem;
    }
}
