/* Modern Calculator Styling */

* {
    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;
}

.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4c51bf;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4c51bf;
}

.main-container {
    padding-top: 80px;
    min-height: 100vh;
    padding:0.3rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 2rem;

}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calculator-container {
    width: 100%;
    max-width: 350px;
    margin: 1rem auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator {
    width: 100%;
}

.calculator-header {
    display: none; /* Hidden for single page app */
}

.calculator-close {
    display: none; /* Hidden for single page app */
}

.calculator-screen {
    margin-bottom: 15px;
}

.calculator-history {
    height: 20px;
    padding: 0 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    margin-bottom: 5px;
}

.calculator-display {
    width: 100%;
    height: 65px;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    text-align: right;
    padding: 0 15px;
    font-size: 2.2rem;
    font-weight: 300;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.calculator-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.key {
    height: 55px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #333;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.key:hover {
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.key:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key.operator,
.key.operator-key {
    background: linear-gradient(145deg, #ff8a65, #ff5722);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(255, 87, 34, 0.3);
    box-shadow: 
        0 4px 12px rgba(255, 87, 34, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.key.operator:hover,
.key.operator-key:hover {
    background: linear-gradient(145deg, #ff7043, #e64a19);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(255, 87, 34, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.key.all-clear,
.key.function-key {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(244, 67, 54, 0.3);
    box-shadow: 
        0 4px 12px rgba(244, 67, 54, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.key.all-clear:hover,
.key.function-key:hover {
    background: linear-gradient(145deg, #e53935, #c62828);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(244, 67, 54, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.key.clear {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    font-weight: 600;
}

.key.clear:hover {
    background: linear-gradient(135deg, #e88d0f, #d35400);
}

.key.equals,
.key.equals-key {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 
        0 4px 12px rgba(76, 175, 80, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.key.equals:hover,
.key.equals-key:hover {
    background: linear-gradient(145deg, #43a047, #2e7d32);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(76, 175, 80, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.key.zero,
.key.zero-key {
    grid-column: span 2;
}

.toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
}

.toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    

    
    .calculator-display {
        font-size: 2rem;
        height: 70px;
    }
    
    .key {
        height: 50px;
        font-size: 1.1rem;
    }
    

}

@media (max-width: 480px) {

    .hero-section h1 {
        font-size: 2rem;
    }
    

    .calculator-keys {
        gap: 10px;
    }
    
    .key {
        height: 45px;
        font-size: 1rem;
    }
}
