/* iOS 스타일 곱셈 계산기 CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 40px);
}

/* 폼 컨테이너 */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

.main-title {
    font-size: 32px;
    font-weight: 800;
    color: #1d1d1f;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 35px;
    font-weight: 500;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.input-wrapper label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrapper input {
    width: 220px;
    height: 55px;
    padding: 0 20px;
    border: none;
    border-radius: 27px;
    background: #f1f3f4;
    font-size: 20px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 700;
    color: #333;
}

.input-wrapper input:focus {
    background: #e8eaed;
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.3);
}

.multiply-symbol {
    font-size: 40px;
    font-weight: 700;
    color: #ff6b6b;
    margin: 10px 0;
    text-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

button, .back-button {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover, .back-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5);
}

button:active, .back-button:active {
    transform: translateY(-2px);
}

/* 결과 컨테이너 */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

.result-container.error {
    text-align: center;
}

.result-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    color: #ff3b30;
    margin-bottom: 15px;
}

.error-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 59, 48, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(255, 59, 48, 0.2);
}

/* 계산 표시 */
.calculation-display {
    margin-bottom: 30px;
}

.input-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.number-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.number-card:hover {
    transform: translateY(-5px);
}

.number-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.number-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #333;
}

.operator {
    font-size: 32px;
    font-weight: 800;
    color: #ff6b6b;
    text-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.equals-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.line {
    flex: 1;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border-radius: 2px;
    max-width: 100px;
}

.equals-symbol {
    font-size: 24px;
    font-weight: 800;
    color: #48dbfb;
    background: white;
    padding: 10px 15px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-display {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
    border-radius: 25px;
    padding: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(72, 219, 251, 0.3);
    animation: slideInUp 0.6s ease 0.3s both;
}

.result-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.result-value {
    display: block;
    font-size: 36px;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.calculation-formula {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 20px;
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.formula {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    font-family: 'SF Mono', Monaco, monospace;
}

.button-group {
    text-align: center;
    margin-top: 25px;
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .form-container, .result-container {
        padding: 25px;
    }
    
    .main-title {
        font-size: 26px;
    }
    
    .input-wrapper input {
        width: 100%;
        max-width: 250px;
        height: 50px;
        font-size: 18px;
    }
    
    .multiply-symbol {
        font-size: 32px;
    }
    
    .result-title {
        font-size: 24px;
    }
    
    .input-numbers {
        flex-direction: column;
        gap: 15px;
    }
    
    .operator {
        font-size: 24px;
        transform: rotate(0deg);
    }
    
    .number-card {
        min-width: 120px;
        padding: 15px;
    }
    
    .number-value {
        font-size: 20px;
    }
    
    .result-value {
        font-size: 28px;
    }
    
    .formula {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .form-container, .result-container {
        padding: 20px;
        border-radius: 20px;
    }
    
    .main-title {
        font-size: 22px;
    }
    
    .result-title {
        font-size: 20px;
    }
    
    .input-wrapper input {
        height: 45px;
        font-size: 16px;
    }
    
    .multiply-symbol {
        font-size: 28px;
    }
    
    .number-card {
        min-width: 100px;
        padding: 12px;
    }
    
    .number-value {
        font-size: 18px;
    }
    
    .result-value {
        font-size: 24px;
    }
    
    button, .back-button {
        padding: 15px 30px;
        font-size: 16px;
    }
}
