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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    color: #1e293b;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #334155;
}

/* Date Input */
.date-input-group {
    display: flex;
    gap: 0.75rem;
}

.date-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
}

.time-toggle {
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

.time-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #64748b;
    font-size: 0.95rem;
    user-select: none;
}

.time-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Operations */
.operations-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.operation-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.operation-sign-toggle {
    display: flex;
    gap: 0.25rem;
    background: #e2e8f0;
    border-radius: 6px;
    padding: 0.25rem;
}

.sign-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #64748b;
}

.sign-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sign-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sign-icon {
    display: block;
}

.operation-value {
    width: 80px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.operation-value:focus {
    outline: none;
    border-color: #667eea;
}

.operation-units {
    display: flex;
    gap: 0.25rem;
    background: #e2e8f0;
    border-radius: 6px;
    padding: 0.25rem;
    flex: 1;
    flex-wrap: wrap;
}

.unit-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    min-width: 45px;
}

.unit-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.unit-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-remove {
    padding: 0.5rem 0.75rem;
    background: #fee;
    border: none;
    border-radius: 6px;
    color: #dc2626;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

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

/* Buttons */
button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-add {
    width: 100%;
    background: #10b981;
    color: white;
    font-size: 0.95rem;
}

.btn-add:hover {
    background: #059669;
}

/* Result */
.result-card {
    background: white;
}

.result-card h2 {
    color: #334155;
}

.result-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.result-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-size: 1.1rem;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.result-item:hover {
    border-color: #667eea;
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.result-item-content {
    flex: 1;
    min-width: 0;
}

.result-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.result-item-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}

.result-copy-btn {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.result-copy-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    color: white;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1rem;
    }

.operation-item {
    flex-wrap: wrap;
}

.operation-sign-toggle {
    width: 100%;
    justify-content: center;
}

.operation-value {
    width: 100%;
}

.operation-units {
    width: 100%;
}

    .result-items {
        grid-template-columns: 1fr;
    }

    .result-item {
        padding: 0.875rem 1rem;
    }

    .result-item-value {
        font-size: 0.9rem;
    }
}

