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

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #17a2b8;
    --primary-light: #20c997;
    --secondary-color: #138496;
    --accent-color: #0dcaf0;
    --text-color: #1f2937;
    --text-light: #4b5563;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 25px -5px rgba(23, 162, 184, 0.1), 0 10px 10px -5px rgba(23, 162, 184, 0.04);
    --success-color: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    --error-color: #f0a10d;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    --gradient-accent: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

body.dark-mode {
    --primary-color: #20c997;
    --primary-light: #0dcaf0;
    --secondary-color: #17a2b8;
    --accent-color: #98f5e1;
    --text-color: #f8fafc;
    --text-light: #e2e8f0;
    --background-color: #0f172a;
    --card-bg: #1e293b;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

h1 {
    text-align: center;
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subject {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 16px;
    background-color: rgba(79, 70, 229, 0.03);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.subject:hover {
    transform: translateX(5px);
    background-color: rgba(79, 70, 229, 0.05);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-light);
    font-size: 15px;
}

.input-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-row .form-group {
    flex: 1;
    min-width: 200px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
    transform: translateY(-2px);
}

/* Placeholder styling */
::placeholder {
    color: #a0aec0;
    opacity: 0.7;
    font-size: 14px;
}

button {
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

button.secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid #e5e7eb;
}

button.secondary:hover {
    background-color: #f3f4f6;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

button.danger {
    background: var(--error-color);
}

button.danger:hover {
    background-color: #dc2626;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

#result, #cgpa-result, #hybrid-result, #practical-result, #theory-result {
    margin-top: 25px;
    font-size: 20px;
    color: var(--primary-color);
    text-align: center;
    padding: 15px;
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

#semester-inputs, #hybrid-semester-inputs, #practical-semester-inputs, #theory-semester-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.navbar {
    height: 70px;
    background-color: var(--card-bg);
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(5deg);
}

.logo:hover .logo-text::before,
.logo:hover .logo-text::after {
    letter-spacing: 2px;
}

.logo .logo-text {
    margin-left: 12px;
    font-weight: 700;
    font-size: 1.7rem;
    background: linear-gradient(45deg, #17a2b8, #0056b3, #17a2b8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite, text-pulse 2s ease-in-out infinite alternate;
    position: relative;
    font-family: 'Arimo', sans-serif;
    letter-spacing: 1px;
    display: flex;
    transition: all 0.3s ease;
}

.logo .logo-text::before {
    content: "CU";
    font-weight: 800;
    letter-spacing: 1px;
    font-family: 'Arimo', sans-serif;
    text-transform: uppercase;
    font-size: 1.8rem;
}

.logo .logo-text::after {
    content: "grades";
    font-weight: 500;
    font-family: 'Arimo', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    margin-left: 1px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #17a2b8, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
    animation: logo-pulse 2s ease-in-out infinite alternate;
    transition: transform 0.3s ease;
}

.logo-icon::before {
    content: "CU";
    font-size: 18px;
    font-family: 'Arimo', sans-serif;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: text-glow 2s ease-in-out infinite alternate;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-icon::after {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, 0.1) 70%);
    animation: shine 4s linear infinite;
}

.footer-logo .logo .logo-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
}

.footer-logo .logo .logo-text::before {
    font-size: 1.7rem;
}

.footer-logo .logo .logo-text::after {
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: 20px;
}

.nav-links li a:hover {
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.tab-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.1);
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: transparent;
    color: var(--text-light);
    border: 2px solid transparent;
}

.tab i {
    font-size: 18px;
}

.tab:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.tab-content {
    display: none;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .navbar {
        padding: 0 16px;
        height: auto;
        min-height: 60px;
    }

    .logo .logo-text {
        font-size: 1.4rem;
    }

    .logo .logo-text::before {
        font-size: 1.5rem;
    }

    .logo .logo-text::after {
        font-size: 1.3rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links li a {
        padding: 6px 12px;
        font-size: 14px;
    }

    .hero-section {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
        gap: 30px;
    }

    .hero-content {
        width: 100%;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: 16px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-button {
        width: 100%;
        padding: 12px 24px;
        font-size: 14px;
        justify-content: center;
    }

    .hero-image {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .hero-image img {
        max-width: 80%;
    }
    
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-row .form-group {
        min-width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    h1 {
        font-size: 24px;
    }

    .tabs {
        padding-bottom: 5px;
        gap: 5px;
    }

    .tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .tab i {
        font-size: 14px;
    }

    .internal-tabs {
        gap: 3px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 14px;
    }

    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Additional mobile-specific styles for very small screens */
@media (max-width: 360px) {
    .navbar {
        padding: 0 12px;
    }

    .logo .logo-text {
        font-size: 1.2rem;
    }

    .logo .logo-text::before {
        font-size: 1.3rem;
    }

    .logo .logo-text::after {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .nav-links {
        gap: 5px;
    }

    .nav-links li a {
        padding: 5px 10px;
        font-size: 13px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }
}

footer {
    background-color: var(--card-bg);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
    text-align: left;
}

.footer-logo .logo {
    font-size: 28px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-logo .logo i {
    font-size: 32px;
    color: var(--primary-color);
}

.footer-logo p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-column {
    min-width: 160px;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

.footer-column ul li a i {
    font-size: 14px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    font-size: 14px;
}

body.dark-mode .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    
    .footer-logo {
        text-align: center;
        max-width: 100%;
    }
    
    .footer-links {
        justify-content: center;
        gap: 40px;
    }
    
    .footer-column {
        min-width: 140px;
    }
}

.result-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.result-value span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 10px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background-color: rgba(79, 70, 229, 0.03);
    border-radius: 12px;
}

.result-component {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--card-bg);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.result-component:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.internal-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    overflow-x: auto;
}

.internal-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Input focus effect */
input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Button hover animation */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(79, 70, 229, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}

/* Authentication Pages Styles */
.auth-container {
    background-color:rgba(76, 175, 80, 0.1) ;
    max-width: 500px;
    margin: 80px auto;
}

.auth-card {
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background-color: var(--card-bg);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: none;
    transform: none;
    box-shadow: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-button {
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.auth-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(23, 162, 184, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    display: none;
}

.auth-result.success {
    display: block;
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.auth-result.error {
    display: block;
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 40px;
    background: var(--gradient-primary);
    color: white;
    margin-bottom: 60px;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-button {
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-button.primary {
    background-color: black;
    color: whitesmoke;
    box-shadow: 0 10px 20px rgba(240, 161, 13, 0.1);
}

.hero-button.primary:hover {
    background-color: #ffffff !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(240, 161, 13, 0.15);
}

.hero-button.secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.hero-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.8);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 70px 100px rgba(3, 3, 3, 0.3)) 
           grayscale(8) brightness(1.7) contrast(1.4) 
           opacity(0.60) sepia(0.5) hue-rotate(190deg);
    animation: float 4s ease-in-out infinite;
    transform-origin: center;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23012A36' fill-opacity='0.2'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    opacity: 0.3;
    animation: wave 20s linear infinite;
}

@keyframes wave {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Features Section */
.features-section {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--background-color);
}

.features-section h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.features-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

.features-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--card-shadow);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 24px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Enhanced Button Styling */
.add-button {
    background: var(--success-color);
    color: white;
}

.add-button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.calculate-button {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

/* Enhanced Form Styling */
.form-group {
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
    transition: var(--transition);
}

.form-group label i {
    color: var(--primary-color);
    font-size: 16px;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--card-bg);
    color: var(--text-color);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Enhanced Result Card Styling */
.result-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.result-value span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 10px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background-color: rgba(79, 70, 229, 0.03);
    border-radius: 12px;
}

.result-component {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--card-bg);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.result-component:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

/* Enhanced Feature Cards */
.feature-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--card-shadow);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 24px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Enhanced Footer */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 60px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
}

.footer-logo .logo {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.footer-logo .logo i {
    font-size: 36px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.footer-column h4 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 12px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-column ul li a i {
    font-size: 16px;
    color: var(--primary-color);
}

/* Dark Mode Enhancements */
body.dark-mode .card {
    background-color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .result-component {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .feature-card {
    background-color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .footer-column h4::after {
    background: var(--gradient-accent);
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg, 
        rgba(79, 70, 229, 0.05) 25%, 
        rgba(79, 70, 229, 0.1) 50%, 
        rgba(79, 70, 229, 0.05) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Dark mode adjustments for new sections */
body.dark-mode .hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
}

body.dark-mode .feature-card {
    background-color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-button {
        width: 100%;
        justify-content: center;
    }
    
    .container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes text-pulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

@keyframes logo-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes logo-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@keyframes text-glow {
    0% { text-shadow: 0 0 2px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a, #164e63);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-logo {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.loading-logo .logo-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    animation: spin 1s linear infinite;
}

.loading-logo .logo-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    box-shadow: none;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-logo .logo-text {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: 'Arimo', sans-serif;
    font-size: 24px;
    font-weight: 700;
    white-space: nowrap;
}

.loading-message {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    margin-top: 50px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: white;
    border-radius: 3px;
    animation: progress 1.2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes progress {
    0% { left: -30%; }
    100% { left: 100%; }
    }
