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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    padding: 20px;
}

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

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 300;
}

.input-section {
    margin-bottom: 30px;
}

#numberInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    outline: none;
}

#numberInput:focus {
    border-color: #333333;
}

.output-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
}

.result-japanese {
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 500;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #555;
    transition: all 0.3s ease;
    position: relative;
}

.result-text {
    flex: 1;
    text-align: center;
}

.copy-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    opacity: 0.7;
    margin-left: 15px;
}

.copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.copy-btn:active {
    transform: scale(0.95);
}

.result:not(:empty),
.result-japanese:not(:empty) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calculator-section {
    margin: 40px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.calculator-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 400;
}

.calculator {
    max-width: 250px;
    margin: 0 auto;
}

.calc-display {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 1.3rem;
    text-align: right;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    word-break: break-all;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    padding: 12px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.calc-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-btn.clear {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.calc-btn.equals {
    background-color: #4ecdc4;
    color: white;
    border-color: #4ecdc4;
    grid-row: span 2;
}

.calc-btn.zero {
    grid-column: span 2;
}

.calc-btn.transfer {
    background-color: #45b7d1;
    color: white;
    border-color: #45b7d1;
    font-weight: 600;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .result,
    .result-japanese {
        font-size: 1.2rem;
    }
}