/* Reset and Base Styles */
* {
    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, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: #000000;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(139, 92, 246, 0.2);
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 100%;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-title {
    font-size: 1.5rem;
    font-weight: 300;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    margin-left: 4rem;
    
}

.top-bar-logo {
    height: 40px;
    width: auto;
    filter: invert(1);
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.user-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-account:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.user-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #667eea;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* Sidebar Styles */
.sidebar {
    width: 70px;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(139, 92, 246, 0.2);
    height: calc(100vh - 60px);
    position: fixed;
    left: 0;
    top: 60px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar:hover,
.sidebar.expanded,
.sidebar.keep-expanded {
    width: 250px;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 400;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.sidebar-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #ffffff;
    border-left-color: #667eea;
}

.sidebar-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: #ffffff;
    border-left-color: #667eea;
}

.sidebar-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.sidebar-item span {
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar:hover .sidebar-item span,
.sidebar.expanded .sidebar-item span,
.sidebar.keep-expanded .sidebar-item span {
    opacity: 1;
}

/* Main Content */
.main-content {
    margin-left: 70px;
    margin-top: 60px;
    flex: 1;
    min-height: 100vh;
}

/* Header Styles */
header {
    background: rgba(30, 27, 75, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    position: static;
    height: 80px;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(139, 92, 246, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2rem;
    height: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
header {
    background: rgb(0, 0, 0);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-title {
    font-size: 1.875rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin-right: 1rem;
}

.logo-img {
    height: 3rem;
    filter: invert(1);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 400;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.dropdown-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.dropdown-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}

.chevron.rotate-180 {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 14rem;
    background: rgba(30, 27, 75, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
    overflow: hidden;
    z-index: 50;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-menu-content {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-left: 1.25rem;
}

.dropdown-item.active {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
    font-weight: 500;
}

.dropdown-item svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Main Content */
main {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(30, 27, 75, 0.9) 100%);
    backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 3rem 2rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

main::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

main::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.main-title {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #b794f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.main-description {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Calculator Section */
.calculator-section {
    background: transparent;
    color: #ffffff;
    padding: 6rem 2rem 2rem;
    margin-bottom: 2rem;
}

.calculator-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
}

.calculator {
    width: 100%;
    max-width: 20rem;
    border-radius: 1.5rem;
    background: rgba(30, 27, 75, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator:hover {
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
}

.calculator-display {
    width: 100%;
    height: 10rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: flex-end;
    text-align: right;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3);
}

.display {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 3.75rem;
    color: #ffffff;
    font-weight: 200;
}

.calculator-buttons {
    width: 100%;
    background: rgba(30, 27, 75, 0.5);
}

.button-row {
    display: flex;
    width: 100%;
}

.calc-button {
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(30, 27, 75, 0.6);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 300;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.calc-button:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
    border-color: rgba(139, 92, 246, 0.5);
}

.calc-button:active {
    transform: scale(0.95);
}

.calc-button.operator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.calc-button.operator:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
}

.calc-button.equals {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
    border-color: rgba(245, 87, 108, 0.5);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.calc-button.equals:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.5);
}

.calc-button.special {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(30, 27, 75, 0.8);
}

.calc-button.special:hover {
    background: rgba(30, 27, 75, 0.9);
    color: rgba(255, 255, 255, 0.9);
}

.calc-button-quarter {
    width: 25%;
    height: 4rem;
}

.calc-button-half {
    width: 50%;
    height: 4rem;
}

/* Calculator Features */
.calculator-features {
    flex: 1;
    margin-left: 2rem;
    color: #ffffff;
}

.features-title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.checkmark {
    color: #667eea;
}

.tips-box {
    padding: 1rem;
    background: rgba(30, 27, 75, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.tips-title {
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.tips-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Graph Section Styles */
.graph-section {
    padding: 6rem 0 3rem;
    background: transparent;
}

.graph-container {
    background: rgba(30, 27, 75, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    border: none;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.graph-container:hover {
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.5);
}

.graph-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.graph-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .graph-grid {
        grid-template-columns: 1fr 2fr;
    }
}

/* Input Section */
.input-section {
    grid-column: span 1;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin-bottom: 1rem;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(30, 27, 75, 0.6);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.range-inputs .form-input {
    padding: 0.5rem 0.75rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 0.5rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 0.75rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.preset-buttons {
    margin-top: 1.5rem;
}

.preset-title {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.preset-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-btn {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 300;
    background: rgba(30, 27, 75, 0.6);
    color: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.preset-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.zoom-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.zoom-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.zoom-btn:active {
    transform: translateY(0);
}

.zoom-in {
    border-color: #6366f1;
    color: #6366f1;
}

.zoom-in:hover {
    background: #eef2ff;
    border-color: #4f46e5;
}

.zoom-out {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.zoom-out:hover {
    background: #f3e8ff;
    border-color: #7c3aed;
}

.zoom-reset {
    border-color: #6b7280;
    color: #6b7280;
}

.zoom-reset:hover {
    background: #f9fafb;
    border-color: #4b5563;
}

/* Range Display */
.range-display {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.range-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.range-label {
    font-weight: 600;
    color: #6366f1;
    min-width: 2rem;
}

.range-info span:last-child {
    color: #374151;
    font-family: 'Courier New', monospace;
}

/* Graph Section */
.graph-section-content {
    grid-column: span 2;
}

@media (min-width: 1024px) {
    .graph-section-content {
        grid-column: span 1;
    }
}

.graph-canvas-container {
    background: rgba(30, 27, 75, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1rem;
    position: relative;
    width: 100%;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.graph-canvas-container canvas {
    width: 100% !important;
    height: auto !important;
}

/* Zoom Controls Overlay */
.zoom-controls-overlay {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.zoom-btn-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(30, 27, 75, 0.8);
    backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.zoom-btn-circle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.zoom-btn-circle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.zoom-btn-circle:active {
    transform: translateY(0);
}

.zoom-btn-circle.zoom-reset {
    color: #6b7280;
    border-color: #6b7280;
}

.zoom-btn-circle.zoom-reset:hover {
    background: #f3f4f6;
}

/* Range Display Overlay */
.range-display-overlay {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 27, 75, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
    z-index: 10;
    display: flex;
    gap: 1rem;
}

.range-info-compact {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.range-info-compact .range-label {
    display: none;
}

.range-info-compact span:last-child {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
}

.info-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(30, 27, 75, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.info-title {
    font-size: 0.875rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    font-size: 0.875rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

/* Calculator Function Buttons */
.calculator-functions {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding-top: 0.5rem;
}

.function-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.function-row:last-child {
    margin-bottom: 0;
}

.calc-button.function {
    flex: 1;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem;
}

.calc-button.function:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.calc-button.function:active {
    transform: translateY(0);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

/* Responsive */
/* User Account Dropdown */
.user-account-wrapper {
    position: relative;
}

.user-account-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-account-header:hover {
    opacity: 0.8;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: rgba(30, 27, 75, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown-menu[style*="display: none"] {
    display: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.dropdown-username {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.dropdown-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.dropdown-divider {
    height: 1px;
    background: rgba(139, 92, 246, 0.2);
}

.dropdown-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.dropdown-logout:hover {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.2) 0%, rgba(240, 147, 251, 0.2) 100%);
    color: #f5576c;
}

.logout-icon {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .logo-title {
        font-size: 1.5rem;
    }
    
    .calculator-container {
        flex-direction: column;
        align-items: center;
    }
    
    .calculator-features {
        margin-left: 0;
        margin-top: 2rem;
        text-align: center;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .calculator-section {
        padding: 2rem 1rem;
    }
    
    .graph-section {
        padding: 1rem;
    }
    
    .graph-content {
        padding: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* ... (tambahkan di akhir file styles.css) ... */

/* History Modal Styles (Copied from calculator.css) */
.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.history-modal.show {
    display: flex;
}

.history-modal-content {
    background: #1a1625;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    box-shadow: 0 8px 24px rgba(89, 86, 213, 0.2);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(89, 86, 213, 0.15);
    backdrop-filter: blur(10px);
}

.history-modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(89, 86, 213, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #241b38;
    border-radius: 15px 15px 0 0;
}

.history-title {
    font-size: 1.3rem;
    color: #ecf0f1;
    margin: 0;
    font-weight: 500;
}

.history-modal-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.clear-history-btn {
    padding: 8px 15px;
    background-color: #5956d5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.clear-history-btn:hover {
    background-color: #4240af;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(89, 86, 213, 0.4);
}

.close-history-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #ecf0f1;
    cursor: pointer;
    padding: 0 5px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-history-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.history-list {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #1a1625;
    border-radius: 0 0 15px 15px;
}

/* ... (Scrollbar styles) ... */

.history-item {
    background-color: #241b38;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(89, 86, 213, 0.15);
    position: relative;
    overflow: hidden;
}

.history-item:hover {
    background-color: #2d2144;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(89, 86, 213, 0.15);
    border-color: rgba(89, 86, 213, 0.3);
}

.history-item .history-expression {
    color: #a8a4ce;
    font-size: 1.1rem; /* Sedikit lebih besar untuk fungsi */
    font-family: 'Consolas', monospace;
    word-break: break-all;
}

/* History toggle button di input section */
.history-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.history-toggle-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.history-toggle-btn svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    stroke-width: 1.5;
}