/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Light Theme */
    --bg-color: #f8faff;
    --calculator-bg: #ffffff;
    --display-bg: #1a1a2e;
    --button-bg: #f5f7ff;
    --button-hover: #eef1ff;
    --button-active: #e2e6ff;
    --button-text: #2d3748;
    --operator-bg: #eef1ff;
    --operator-hover: #e2e6ff;
    --operator-active: #d0d9ff;
    --function-bg: #f0f4ff;
    --function-hover: #e2e9ff;
    --function-active: #d0dcff;
    --equals-bg: #4a6bff;
    --equals-hover: #3a5bff;
    --equals-text: #ffffff;
    --clear-bg: #ff6b6b;
    --clear-hover: #ff5252;
    --clear-text: #ffffff;
    --delete-bg: #ffd166;
    --delete-hover: #ffc043;
    --delete-text: #212529;
    --border-color: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.12);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --panel-bg: #ffffff;
    --tab-active: #4a6bff;
    --tab-inactive: #e2e8f0;
    --primary-color: #4a6bff;
    --secondary-color: #6c5ce7;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
.dark-theme {
    --bg-color: #0f172a;
    --calculator-bg: #1e293b;
    --display-bg: #0f172a;
    --button-bg: #1e293b;
    --button-hover: #334155;
    --button-active: #475569;
    --button-text: #e2e8f0;
    --operator-bg: #1e3a8a;
    --operator-hover: #1e40af;
    --operator-active: #1e4ed8;
    --function-bg: #1e1b4b;
    --function-hover: #2e2a6e;
    --function-active: #3e3a8a;
    --equals-bg: #4a6bff;
    --equals-hover: #5a7bff;
    --equals-text: #ffffff;
    --clear-bg: #7f1d1d;
    --clear-hover: #991b1b;
    --clear-text: #ffffff;
    --delete-bg: #854d0e;
    --delete-hover: #a16207;
    --delete-text: #ffffff;
    --border-color: #2d3748;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --panel-bg: #1e293b;
    --tab-active: #4a6bff;
    --tab-inactive: #334155;
}

/* Typography & Layout */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(74, 107, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 107, 255, 0.4);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: rgba(74, 107, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--calculator-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-3, 
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgcGF0dGVyblRyYW5zZm9ybT0icm90YXRlKDQ1KSI+PHJlY3Qgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiPjwvcmVjdD48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjcGF0dGVybikiPjwvcmVjdD48L3N2Zz4=');
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.hero-feature {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-feature i {
    margin-right: 8px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

/* Calculator Container */
.calculator-container {
    max-width: 800px;
    margin: 0 auto 4rem;
    background-color: var(--calculator-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.calculator-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Calculator Display */
.calculator-display {
    padding: 1.5rem;
    background: linear-gradient(135deg, #2c3e50, #1a1a2e);
    text-align: right;
    position: relative;
    color: white;
    font-family: 'Fira Code', 'Courier New', monospace;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calculator-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 107, 255, 0.1), rgba(108, 92, 231, 0.1));
    z-index: 0;
}

.calculator-memory {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.calculator-history {
    min-height: 22px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.25rem 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
    opacity: 0.9;
    transition: all 0.3s ease;
}

#display {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 2.8rem;
    text-align: right;
    color: white;
    outline: none;
    font-family: 'Fira Code', 'Courier New', monospace;
    padding: 0.5rem 0;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Animation for display update */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.display-update {
    animation: pulse 0.3s ease-in-out;
}

/* Calculator Keypad */
.calculator-keypad {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
    padding: 1.2rem;
    background: var(--button-bg);
    border-top: 1px solid var(--border-color);
}

/* Calculator Buttons */
.btn {
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Number Buttons */
.btn-number {
    background-color: var(--button-bg);
    color: var(--button-text);
}

.btn-number:hover {
    background-color: var(--button-hover);
}

/* Operator Buttons */
.btn-operator {
    background-color: var(--operator-bg);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-operator:hover {
    background-color: var(--operator-hover);
}

/* Function Buttons */
.btn-function {
    background-color: var(--function-bg);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
}

.btn-function:hover {
    background-color: var(--function-hover);
}

/* Equals Button */
.btn-equals {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(74, 107, 255, 0.3) !important;
}

.btn-equals:hover {
    background: linear-gradient(135deg, var(--primary-color), #5d4de8);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(74, 107, 255, 0.4) !important;
}

.btn-equals:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(74, 107, 255, 0.3) !important;
}

/* Clear Button */
.btn-clear {
    background: linear-gradient(135deg, var(--clear-bg), #ff8787);
    color: white;
    font-weight: 500;
}

.btn-clear:hover {
    background: linear-gradient(135deg, var(--clear-hover), #ff6b6b);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-clear:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3) !important;
}

.btn-delete {
    background: linear-gradient(135deg, var(--delete-bg), #ffb74d);
    color: var(--delete-text);
    font-weight: 500;
}

.btn-delete:hover {
    background: linear-gradient(135deg, var(--delete-hover), #ffa726);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.btn-delete:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3) !important;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--calculator-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 107, 255, 0.1), rgba(108, 92, 231, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.75rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.1);
}

.feature-card h3 {
    margin: 1rem 0;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background-color: var(--panel-bg);
}

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

.faq-item {
    background: var(--calculator-bg);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    padding: 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--button-hover);
}

.faq-question i {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--calculator-bg);
}

.faq-answer p {
    margin: 0;
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 0;
}

/* Related Tools Section */
.related-tools {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--calculator-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.tool-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.tool-card:hover i {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.tool-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Call to Action Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgcGF0dGVyblRyYW5zZm9ybT0icm90YXRlKDQ1KSI+PHJlY3Qgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiPjwvcmVjdD48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjcGF0dGVybikiPjwvcmVjdD48L3N2Zz4=');
    opacity: 0.3;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px;
    margin: 0.5rem 0;
}

.cta-buttons .btn-outline {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.cta-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .features-grid,
    .tools-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1.25rem 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}

.btn-delete:hover {
    background-color: var(--delete-hover);
}

/* Advanced Panel */
.advanced-panel {
    background-color: var(--panel-bg);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.advanced-panel.active {
    max-height: 500px;
    padding: 1rem;
}

.panel-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.panel-tab.active {
    color: var(--tab-active);
    border-bottom-color: var(--tab-active);
}

.tab-content {
    display: none;
    padding: 1rem 0;
}

.tab-content.active {
    display: block;
}

.scientific-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.constants-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.btn-sci, .btn-constant {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-sci:hover, .btn-constant:hover {
    background-color: var(--button-hover);
}

/* Conversion Tab */
.conversion-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--button-bg);
    color: var(--text-primary);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Graph Tab */
.graph-container {
    margin-top: 1rem;
    height: 300px;
    background-color: var(--button-bg);
    border-radius: 6px;
    padding: 1rem;
}

/* Memory and View Controls */
.calculator-extra-controls {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--panel-bg);
}

.memory-controls {
    display: flex;
    gap: 0.5rem;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-memory, .btn-view {
    padding: 0.5rem;
    font-size: 0.9rem;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-memory:hover, .btn-view:hover {
    background-color: var(--button-hover);
}

/* How to Use Section */
.how-to-use {
    margin: 3rem 0;
    background-color: var(--calculator-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.how-to-use h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    background-color: var(--panel-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.feature p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature strong {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-keypad {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .scientific-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .constants-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calculator-extra-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .memory-controls, .view-controls {
        justify-content: center;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Utility Classes */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-secondary) !important;
}
