/* Percentage Calculator Styles */
.percentage-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Tabs */
.pc-tabs {
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px;
    gap: 4px;
}

.pc-tab {
    flex: 1;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pc-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pc-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Calculator Card */
.pc-calculator-card {
    padding: 24px;
}

.pc-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.pc-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pc-description {
    color: #666;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.5;
}

/* Input Groups */
.pc-input-group {
    margin-bottom: 20px;
}

.pc-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.pc-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.pc-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pc-input::placeholder {
    color: #a0aec0;
}

/* Radio Group */
.pc-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.pc-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pc-radio-label:hover {
    background: #edf2f7;
}

.pc-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Buttons */
.pc-button {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.pc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.pc-button:active {
    transform: translateY(0);
}

.pc-calculate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pc-reset {
    background: #f1f5f9;
    color: #64748b;
}

.pc-calculate:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.pc-reset:hover {
    background: #e2e8f0;
}

/* Results */
.pc-result {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f6f9ff 0%, #f0f4ff 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.pc-result h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.pc-result-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
    min-height: 40px;
}

.pc-explanation {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    padding-top: 10px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .percentage-calculator {
        border-radius: 12px;
        margin: 0 15px;
    }
    
    .pc-tabs {
        flex-direction: column;
    }
    
    .pc-tab {
        min-width: 100%;
    }
    
    .pc-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .pc-button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .pc-result-value {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .pc-calculator-card {
        padding: 20px 16px;
    }
    
    .pc-result-value {
        font-size: 24px;
    }
}

/* Accessibility */
.pc-input:focus-visible,
.pc-button:focus-visible,
.pc-tab:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .pc-input {
        border-width: 3px;
    }
    
    .pc-result {
        border-width: 3px;
    }
}