/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
}

/* App container layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar styles */
.sidebar {
    width: 300px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.calculator-nav {
    margin-top: 20px;
}

.nav-category {
    margin-bottom: 25px;
}

.nav-category h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #ecf0f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nav-category ul {
    list-style: none;
}

.nav-category li {
    margin-bottom: 5px;
}

.tab-link {
    display: block;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

/* Main content styles */
.main-content {
    flex: 1;
    padding: 20px;
    background: white;
    overflow: hidden;
}

.calculator-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.calculator-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Navigation arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-arrow:hover {
    background: rgba(52, 152, 219, 1);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.prev {
    left: 10px;
}

.nav-arrow.next {
    right: 10px;
}

.nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calculator-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.calculator-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Result styles */
.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 1.1rem;
    text-align: center;
}

.result .success {
    color: #27ae60;
    background: #d5f4e6;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #27ae60;
}

.result .error {
    color: #e74c3c;
    background: #fadbd8;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

.result strong {
    font-size: 1.2rem;
}

/* Footer styles */
footer {
    background: #ecf0f1;
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    border-top: 1px solid #bdc3c7;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .calculator-section {
        padding: 20px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .calculator-section h2 {
        font-size: 1.2rem;
    }
    
    button {
        width: 100%;
        padding: 15px;
    }
}

/* Animation for results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result p {
    animation: fadeIn 0.3s ease-in-out;
}

/* Loading state for buttons */
button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Additional visual enhancements */
.calculator-section:nth-child(2) {
    border-left-color: #9b59b6;
}

.calculator-section:nth-child(2) button {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.calculator-section:nth-child(2) button:hover {
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.calculator-section:nth-child(2) input:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.calculator-section:nth-child(3) {
    border-left-color: #27ae60;
}

.calculator-section:nth-child(3) button {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.calculator-section:nth-child(3) button:hover {
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.calculator-section:nth-child(3) input:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.calculator-section:nth-child(4) {
    border-left-color: #f39c12;
}

.calculator-section:nth-child(4) button {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.calculator-section:nth-child(4) button:hover {
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.calculator-section:nth-child(4) input:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.calculator-section:nth-child(5) {
    border-left-color: #e74c3c;
}

.calculator-section:nth-child(5) button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.calculator-section:nth-child(5) button:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.calculator-section:nth-child(5) input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.calculator-section:nth-child(6) {
    border-left-color: #1abc9c;
}

.calculator-section:nth-child(6) button {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
}

.calculator-section:nth-child(6) button:hover {
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.4);
}

.calculator-section:nth-child(6) input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.calculator-section:nth-child(7) {
    border-left-color: #34495e;
}

.calculator-section:nth-child(7) button {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.calculator-section:nth-child(7) button:hover {
    box-shadow: 0 5px 15px rgba(52, 73, 94, 0.4);
}

.calculator-section:nth-child(7) input:focus {
    border-color: #34495e;
    box-shadow: 0 0 0 3px rgba(52, 73, 94, 0.1);
}