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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #ffffff;
            color: #1a202c;
            line-height: 1.6;
        }

        /* Top Navigation */
        .top-nav {
            background: #2d3748;
            color: white;
            padding: 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

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

        .logo {
            font-size: 24px;
            font-weight: 700;
            padding: 15px 0;
            color: white;
            text-decoration: none;
        }

        .logo span {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 0;
        }

        .nav-menu li a {
            color: white;
            text-decoration: none;
            padding: 20px 20px;
            display: block;
            transition: all 0.3s;
            font-weight: 500;
        }

        .nav-menu li a:hover, .nav-menu li a.active {
            background: rgba(102, 126, 234, 0.2);
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 10px;
        }

        /* Top Banner Ad */
        .top-banner-ad {
            background: #f8f9fa;
            text-align: center;
            padding: 20px;
            border-bottom: 1px solid #e9ecef;
            min-height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ad-placeholder {
            color: #6c757d;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 60px 20px;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .hero h1 {
            font-size: 48px;
            font-weight: 700;
            margin-bottom: 15px;
            letter-spacing: -1px;
        }

        .hero p {
            font-size: 20px;
            opacity: 0.95;
            max-width: 700px;
            margin: 0 auto;
        }

        /* Main Layout */
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 40px 20px;
            display: grid;
            grid-template-columns: 300px 1fr 300px;
            gap: 30px;
        }

        .sidebar-left, .sidebar-right {
            position: sticky;
            top: 80px;
            height: fit-content;
        }

        .sidebar-ad {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            min-height: 600px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #e9ecef;
        }

        .main-content {
            background: white;
        }

        /* Calculator Section */
        .calculator-box {
            background: white;
            border-radius: 15px;
            padding: 40px;
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
            margin-bottom: 40px;
        }

        .calculator-box.advanced-calculator {
            background: linear-gradient(to bottom, #ffffff 0%, #f7fafc 100%);
            border: 2px solid #667eea;
            margin-top: 0;
        }

        .between-calculators {
            margin: 30px 0 30px 0 !important;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border: 2px dashed #dee2e6;
            min-height: 250px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        .calculator-description {
            color: #718096;
            font-size: 15px;
            margin-bottom: 25px;
            font-style: italic;
        }

        .section-title {
            font-size: 28px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 10px;
            padding-bottom: 15px;
            border-bottom: 3px solid #667eea;
        }

        .input-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 25px;
            margin-bottom: 30px;
        }

        .input-grid-four {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }

        .helper-text {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            padding: 15px 20px;
            border-radius: 10px;
            text-align: center;
            color: #4a5568;
            font-size: 14px;
            margin-bottom: 25px;
            border: 1px solid rgba(102, 126, 234, 0.2);
        }

        .input-group label {
            display: block;
            color: #4a5568;
            font-weight: 600;
            margin-bottom: 10px;
            font-size: 15px;
        }

        .input-wrapper {
            position: relative;
        }

        .currency-symbol {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: #718096;
            font-size: 20px;
            font-weight: 600;
        }

        input[type="number"] {
            width: 100%;
            padding: 18px 18px 18px 45px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            font-size: 20px;
            transition: all 0.3s;
            font-family: inherit;
            background: #f7fafc;
        }

        input[type="number"]:focus {
            outline: none;
            border-color: #667eea;
            background: white;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }

        input[type="number"]:not(:placeholder-shown) {
            background: white;
            border-color: #48bb78;
            font-weight: 600;
        }

        #advProfit:not(:placeholder-shown) {
            color: #48bb78;
        }

        #advMargin:not(:placeholder-shown) {
            color: #667eea;
        }

        .results {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 15px;
            padding: 35px;
            margin: 30px 0;
            color: white;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
        }

        .results-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }

        .result-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 25px;
            border-radius: 12px;
            backdrop-filter: blur(10px);
        }

        .result-label {
            font-size: 13px;
            opacity: 0.9;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .result-value {
            font-size: 36px;
            font-weight: 700;
            letter-spacing: -1px;
            margin-bottom: 5px;
        }

        .result-secondary {
            font-size: 15px;
            opacity: 0.85;
        }

        .save-btn {
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
            color: white;
            border: none;
            padding: 16px 45px;
            font-size: 17px;
            font-weight: 600;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
            margin-top: 10px;
            width: 100%;
            max-width: 300px;
        }

        .save-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
            background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
        }

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

        /* History Section */
        .history-section {
            margin-top: 40px;
            padding-top: 30px;
            border-top: 2px solid #e2e8f0;
        }

        .history-actions {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
        }

        .export-btn, .clear-btn {
            padding: 12px 24px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            border: none;
        }

        .export-btn {
            background: #48bb78;
            color: white;
        }

        .export-btn:hover {
            background: #38a169;
        }

        .clear-btn {
            background: #f56565;
            color: white;
        }

        .clear-btn:hover {
            background: #e53e3e;
        }

        .table-wrapper {
            overflow-x: auto;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .history-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
        }

        .history-table thead {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .history-table th {
            padding: 15px;
            text-align: left;
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .history-table td {
            padding: 15px;
            border-bottom: 1px solid #e2e8f0;
            color: #4a5568;
            font-size: 15px;
        }

        .history-table tbody tr:hover {
            background: #f7fafc;
        }

        .delete-btn {
            background: #f56565;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s;
        }

        .delete-btn:hover {
            background: #e53e3e;
        }

        .positive {
            color: #48bb78;
            font-weight: 600;
        }

        .negative {
            color: #f56565;
            font-weight: 600;
        }

        .type-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        /* Content Sections */
        .content-section {
            background: white;
            border-radius: 15px;
            padding: 40px;
            margin-bottom: 30px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .content-section h2 {
            font-size: 32px;
            color: #2d3748;
            margin-bottom: 20px;
            font-weight: 700;
        }

        .content-section h3 {
            font-size: 24px;
            color: #2d3748;
            margin: 30px 0 15px;
            font-weight: 600;
        }

        .content-section p {
            color: #4a5568;
            font-size: 16px;
            line-height: 1.8;
            margin-bottom: 15px;
        }

        .content-section ul, .content-section ol {
            margin: 15px 0 15px 25px;
            color: #4a5568;
        }

        .content-section li {
            margin-bottom: 10px;
            line-height: 1.7;
        }

        .formula-box {
            background: #f7fafc;
            border-left: 4px solid #667eea;
            padding: 20px;
            margin: 20px 0;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            color: #2d3748;
        }

        .highlight-box {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border-radius: 12px;
            padding: 25px;
            margin: 25px 0;
        }

        .in-content-ad {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin: 40px 0;
            min-height: 280px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #e9ecef;
        }

        /* FAQ Section */
        .faq-item {
            background: #f7fafc;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 15px;
            border-left: 4px solid #667eea;
        }

        .faq-item h3 {
            color: #2d3748;
            font-size: 18px;
            margin: 0 0 10px 0;
        }

        .faq-item p {
            margin: 0;
        }

        /* Footer */
        footer {
            background: #2d3748;
            color: white;
            padding: 50px 20px 20px;
            margin-top: 60px;
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-section h4 {
            font-size: 18px;
            margin-bottom: 20px;
            color: #667eea;
        }

        .footer-section ul {
            list-style: none;
        }

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

        .footer-section ul li a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-section ul li a:hover {
            color: #667eea;
        }

        .footer-section p {
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.6;
            font-size: 14px;
        }

        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 20px;
            text-align: center;
            color: rgba(255, 255, 255, 0.6);
            font-size: 14px;
        }

        /* Mobile Responsive */
        @media (max-width: 1200px) {
            .container {
                grid-template-columns: 250px 1fr;
            }
            .sidebar-right {
                display: none;
            }
        }

        @media (max-width: 968px) {
            .container {
                grid-template-columns: 1fr;
            }
            .sidebar-left {
                position: static;
            }
            .sidebar-ad {
                min-height: 250px;
            }
            .footer-content {
                grid-template-columns: repeat(2, 1fr);
                gap: 30px;
            }

            .input-grid-four {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .nav-menu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: #2d3748;
                flex-direction: column;
                padding: 0;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            }

            .nav-menu.active {
                display: flex;
            }

            .nav-menu li a {
                padding: 15px 20px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

            .mobile-menu-btn {
                display: block;
            }

            .hero h1 {
                font-size: 32px;
            }

            .hero p {
                font-size: 16px;
            }

            .calculator-box, .content-section {
                padding: 25px;
            }

            .input-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .input-grid-four {
                grid-template-columns: 1fr;
            }

            .results-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .result-value {
                font-size: 28px;
            }

            .content-section h2 {
                font-size: 24px;
            }

            .footer-content {
                grid-template-columns: 1fr;
                gap: 30px;
            }

            /* Mobile table styles */
            .history-table {
                font-size: 12px;
            }

            .history-table th,
            .history-table td {
                padding: 10px 8px;
            }

            .history-actions {
                flex-direction: column;
            }

            .export-btn, .clear-btn {
                width: 100%;
            }

            .save-btn {
                max-width: 100%;
                font-size: 16px;
                padding: 14px 30px;
            }

            .helper-text {
                font-size: 13px;
                padding: 12px 15px;
            }

            .between-calculators {
                min-height: 200px;
                margin: 20px 0 20px 0 !important;
            }
        }