/* Subscription Waste Calculator - Main Styles */

:root {
    --primary-color: #b65cb8;
    --primary-dark: #9d4c9f;
    --primary-light: #d08cd2;
    --secondary-color: #2b2b2b;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #2b2b2b;
    --text-secondary: #6c757d;
    --border-color: #e0e0e0;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.floating-icon {
    position: absolute;
    font-size: 24px;
    color: var(--primary-color);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.floating-icon:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-icon:nth-child(2) { top: 20%; left: 80%; animation-delay: 2s; }
.floating-icon:nth-child(3) { top: 40%; left: 30%; animation-delay: 4s; }
.floating-icon:nth-child(4) { top: 60%; left: 70%; animation-delay: 6s; }
.floating-icon:nth-child(5) { top: 80%; left: 20%; animation-delay: 8s; }
.floating-icon:nth-child(6) { top: 30%; left: 60%; animation-delay: 10s; }
.floating-icon:nth-child(7) { top: 70%; left: 50%; animation-delay: 12s; }
.floating-icon:nth-child(8) { top: 50%; left: 85%; animation-delay: 14s; }
.floating-icon:nth-child(9) { top: 15%; left: 45%; animation-delay: 16s; }
.floating-icon:nth-child(10) { top: 85%; left: 75%; animation-delay: 18s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(5deg);
    }
    50% {
        transform: translateY(-60px) translateX(-20px) rotate(-5deg);
    }
    75% {
        transform: translateY(-30px) translateX(20px) rotate(5deg);
    }
}

/* Navigation */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.cta-button i {
    margin-left: 8px;
    animation: bounce 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Info Section */
.info-section {
    padding: 80px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
    background: white;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Currency Selector */
.currency-selector-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.currency-selector-wrapper label {
    display: block;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.currency-selector-wrapper i {
    margin-right: 8px;
}

.currency-select {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.currency-select:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.currency-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(182, 92, 184, 0.3);
}

/* Calculator Form */
.calculator-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.calculator-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.form-input {
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(182, 92, 184, 0.1);
}

.add-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.add-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.add-button i {
    margin-right: 8px;
}

/* Subscriptions List */
.subscriptions-list {
    margin-bottom: 2rem;
}

.subscriptions-header {
    margin-bottom: 1.5rem;
}

.subscriptions-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.subscription-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.subscription-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.sub-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sub-name i {
    color: var(--primary-color);
}

.delete-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.sub-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.sub-detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.waste-amount {
    color: var(--danger);
}

.sub-recommendation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.sub-recommendation.cancel {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.sub-recommendation.review {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
}

.sub-recommendation.keep {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.sub-recommendation i {
    font-size: 1.2rem;
}

/* Total Summary */
.total-summary {
    animation: fadeInUp 0.5s ease;
}

.summary-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: white;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.summary-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.summary-divider {
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
}

/* Benefits Section */
.benefits-section {
    padding: 80px 0;
    background: var(--background);
}

.benefits-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 2rem;
}

.benefit-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.benefit-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.benefit-item p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.5rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        flex-direction: column;
        gap: 2rem;
    }
    
    .summary-divider {
        width: 100%;
        height: 2px;
    }
    
    .summary-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo span {
        font-size: 1rem;
    }
    
    .nav-links {
        font-size: 0.9rem;
        gap: 0.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .calculator-form,
    .currency-selector-wrapper {
        padding: 1.5rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    left: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(182, 92, 184, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top i {
    animation: bounce-up 2s infinite;
}

@keyframes bounce-up {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Responsive adjustments for scroll button */
@media (max-width: 768px) {
    .scroll-to-top {
        left: 20px;
        bottom: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        left: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
}
