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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.calculator {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

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

label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.3s;
    margin-bottom: 15px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    cursor: pointer;
    transition: all 0.3s;
}

#calculateBtn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
}

#calculateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#calculateBtn:active {
    transform: translateY(0);
}

.result-section {
    display: none;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.result-section.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

.result-label {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1em;
}

.copy-btn {
    padding: 5px 12px;
    font-size: 0.85em;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
}

.copy-btn:hover {
    background: #5568d3;
}

.copy-btn.copied {
    background: #28a745;
}

.result-value {
    font-family: 'Courier New', monospace;
    font-size: 1em;
    color: #333;
    word-break: break-all;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 5px;
    margin-bottom: 10px;
}

.result-info {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.error-section {
    display: none;
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 10px;
    color: #856404;
}

.error-section.show {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

.error-icon {
    font-size: 1.5em;
}

.examples {
    margin: 30px 0;
}

.examples h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.example-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.example-btn {
    padding: 12px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
}

.example-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.info-box {
    margin-top: 30px;
    padding: 20px;
    background: #e7f3ff;
    border-radius: 10px;
    border-left: 4px solid #2196F3;
}

.info-box h3 {
    color: #1976D2;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info-box p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.info-box code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d63384;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .calculator {
        padding: 25px;
    }

    h1 {
        font-size: 2em;
    }

    .example-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}
