/* Main Calculator Container */
.advanced-fraction-calculator {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #d1d9e6;
    padding-bottom: 10px;
}

.tab-button {
    padding: 10px 15px;
    background: #f0f4f8;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #3a4a6d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-button:hover {
    background: #e0e6ed;
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-top: 0;
    color: #3a4a6d;
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-content h3 i {
    font-size: 18px;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.fraction-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 100px;
}

.fraction-part {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d1d9e6;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.05);
}

.fraction-part:focus {
    outline: none;
    border-color: #6a8caf;
    background-color: #fff;
}

.fraction-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #3a4a6d;
    margin: 5px 0;
}

/* Mixed Number Input */
.mixed-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mixed-whole {
    width: 50px;
    padding: 12px;
    border: 2px solid #d1d9e6;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.mixed-whole:focus {
    outline: none;
    border-color: #6a8caf;
    background-color: #fff;
}

/* Operation Select */
.operation-select {
    padding: 12px;
    border: 2px solid #d1d9e6;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
}

.operation-select:focus {
    outline: none;
    border-color: #6a8caf;
}

/* Decimal Input */
.decimal-input-field {
    width: 200px;
    padding: 12px 15px;
    border: 2px solid #d1d9e6;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.decimal-input-field:focus {
    outline: none;
    border-color: #6a8caf;
    background-color: #fff;
}

/* Big Number Input */
.big-number-input {
    font-family: monospace;
    min-width: 150px;
}

.big-number-description {
    font-size: 14px;
    color: #6a8caf;
    text-align: center;
    margin-bottom: 15px;
}

/* Buttons */
.calculate-button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    min-width: 150px;
    margin-top: 10px;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #5a6fd1 0%, #6a3d9a 100%);
}

/* Result Section */
.result-container {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-top: 20px;
}

.result-container h4 {
    margin-top: 0;
    color: #3a4a6d;
    font-size: 16px;
    margin-bottom: 15px;
}

.result-box {
    margin: 15px 0;
}

.result-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.result-fraction .fraction-part {
    border: none;
    background: transparent;
    font-size: 22px;
    font-weight: bold;
    color: #3a4a6d;
    padding: 5px;
    pointer-events: none;
    box-shadow: none;
}

.result-fraction .fraction-line {
    width: 60px;
}

.mixed-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mixed-result .mixed-whole {
    border: none;
    background: transparent;
    font-size: 22px;
    font-weight: bold;
    color: #3a4a6d;
    padding: 5px;
    pointer-events: none;
    box-shadow: none;
    width: auto;
}

.result-decimal {
    font-size: 18px;
    color: #6a8caf;
    font-weight: bold;
    margin-top: 10px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.copy-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.copy-button:hover {
    background: linear-gradient(135deg, #3a9bed 0%, #00d9e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.reset-button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.reset-button:hover {
    background: linear-gradient(135deg, #d982e8 0%, #e04d5d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .calculator-tabs {
        justify-content: center;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .operation-select {
        margin: 10px 0;
    }
    
    .advanced-fraction-calculator {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .tab-button {
        flex-grow: 1;
        text-align: center;
    }
    
    .mixed-input {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-button {
        justify-content: center;
    }
}