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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #1a1a1a;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease-out;
}

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

h1 {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: -1.5px;
}

.subtitle {
    color: #4a5568;
    font-size: 1.25em;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.input-card h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.quality-section {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
}

.quality-info {
    color: #718096;
    font-size: 0.9em;
    margin-bottom: 20px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 8px;
    border-left: 3px solid #ff0000;
}

.input-group {
    margin-bottom: 20px;
}

.input-group:last-of-type {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95em;
}

.slider-group {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 15px;
    align-items: center;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #ff0000 0%, #cc0000 100%);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
    cursor: pointer;
    border: 3px solid #ff0000;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
    cursor: pointer;
    border: 3px solid #ff0000;
    transition: all 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    color: #2d3748;
    transition: all 0.3s;
    text-align: center;
}

input[type="number"]:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.engagement-display {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.engagement-label {
    color: white;
    font-weight: 600;
    font-size: 1.1em;
}

.engagement-value {
    color: white;
    font-weight: 800;
    font-size: 1.5em;
}

.reset-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.reset-btn:active {
    transform: translateY(-1px);
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.results-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.results-card h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-align: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.05em;
}

.result-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.balance-value {
    font-weight: 700;
    color: #ff0000;
    font-size: 1.2em;
}

.coupon-value {
    font-size: 0.9em;
    color: #48bb78;
    font-weight: 600;
}

.quality-note {
    color: #a0aec0;
    font-style: italic;
}

.divider {
    height: 2px;
    background: linear-gradient(to right, #ff0000 0%, #cc0000 100%);
    margin: 20px 0;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.total-label {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.2em;
}

.total-value {
    font-weight: 800;
    font-size: 1.5em;
}

.balance-total {
    color: #ff0000;
}

.coupon-total {
    color: #48bb78;
}

.grand-total {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border-radius: 15px;
    text-align: center;
}

.grand-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.grand-value {
    color: white;
    font-size: 2.5em;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: #fff5f5;
    border-radius: 10px;
    border-left: 4px solid #f56565;
}

.disclaimer p {
    color: #c53030;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.info-card h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.tier-info {
    margin-bottom: 25px;
}

.tier-info:last-child {
    margin-bottom: 0;
}

.tier-info h4 {
    font-size: 1.1em;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 600;
}

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

.tier-info ul li {
    padding: 8px 0 8px 25px;
    color: #4a5568;
    position: relative;
    font-size: 0.95em;
}

.tier-info ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #ff0000;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .results-section {
        position: static;
    }

    h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .input-card {
        padding: 20px;
    }

    .results-card {
        padding: 25px;
    }

    .slider-group {
        grid-template-columns: 1fr 100px;
        gap: 10px;
    }

    input[type="number"] {
        padding: 10px;
        font-size: 0.9em;
    }

    .grand-value {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6em;
    }

    .input-card h2 {
        font-size: 1.2em;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .result-values {
        align-items: flex-start;
    }

    .total-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

footer {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(255, 0, 0, 0.1);
    margin-top: 100px;
    padding: 50px 20px;
}

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

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

.footer-logo a {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-logo a:hover {
    transform: scale(1.08);
}

.logo-text {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    color: #4a5568;
    font-size: 0.95em;
    margin-top: 8px;
    font-weight: 500;
}

.social-links {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 20px;
    min-width: 200px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    border-color: #ff0000;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.2);
    background: linear-gradient(135deg, #fff0f0 0%, #ffe5e5 100%);
}

.social-link svg {
    width: 26px;
    height: 26px;
    transition: transform 0.3s;
}

.social-link:hover svg {
    transform: scale(1.15);
}

.footer-info {
    flex: 1;
    text-align: right;
    min-width: 200px;
    color: #4a5568;
}

.footer-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

.footer-wrapper {
    max-width: 1000px;
    margin: 40px auto 0;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-wrapper p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 0.88em;
    margin-bottom: 15px;
    font-weight: 400;
}

.copyright {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.85em;
    color: #718096;
}

.copyright a {
    color: #ff0000;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.copyright a:hover {
    text-decoration: underline;
    color: #cc0000;
}

/* Video Cards Styles */
#videosContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.video-card {
    background: linear-gradient(135deg, #fff9f9 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #ffe5e5;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: #ffcccc;
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.1);
}

.video-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffe5e5;
}

.video-card-header h3 {
    font-size: 1.1em;
    color: #ff0000;
    font-weight: 700;
}

.remove-video-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-video-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.video-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}

.video-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.video-input-group label {
    font-size: 0.85em;
    color: #4a5568;
    font-weight: 600;
}

.video-input-group input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.2s;
}

.video-input-group input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.engagement-rate-display {
    padding: 10px 12px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    font-size: 1em;
}

.add-video-btn {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    width: 100%;
}

.add-video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

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

@media (max-width: 768px) {
    .video-input-row {
        grid-template-columns: 1fr;
    }
}