/* CSS Variables */
:root {
    --very-peri: #5B5C9A;
    --dark-peri: #3E3F6A;
    --darker-peri: #2A2B4F;
    --darkest-peri: #1F2030;
    --accent: #7A6EB7;
    --light-peri: #898AC8;
    --text-light: #E8E8F5;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --highlight-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(42, 43, 79, 0.5);
    --glass-border: rgba(255, 255, 255, 0.15);
    --accent-glass-bg: rgba(154, 155, 217, 0.15);
    --accent-border: rgba(139, 126, 200, 0.7);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--darkest-peri) 0%, var(--darker-peri) 50%, var(--dark-peri) 100%);
    min-height: 100vh;
    color: var(--text-light);
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: all 0.3s ease;
}

body.nav-open {
    overflow: hidden;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: var(--accent-glass-bg);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite alternate;
    filter: blur(8px);
}

.shape:nth-child(1) {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 10%;
    animation-duration: 12s;
}

.shape:nth-child(2) {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 15%;
    animation-duration: 8s;
    animation-delay: -2s;
}

.shape:nth-child(3) {
    width: 120px;
    height: 120px;
    bottom: 15%;
    left: 20%;
    animation-duration: 10s;
    animation-delay: -4s;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px); }
    100% { transform: translateY(-30px) translateX(20px); }
}

/* Main Container - Standarisasi ukuran */
.container-main {
    max-width: 900px;
    min-height: 600px;
    width: 100%;
    padding: 20px 25px 30px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px var(--shadow-color);
    animation: fadeInScaleUp 0.8s ease-out forwards;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

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

/* Content Wrapper untuk standarisasi layout */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Header Section */
.header-section {
    position: relative;
    margin-bottom: 25px;
    flex-shrink: 0;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Logo Section */
.logo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.logo {
    height: 85px;
    width: 800px;
    object-fit: contain;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-link {
    padding: 8px 12px;
    color: rgba(232, 232, 245, 0.7);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-link:hover {
    color: white;
    background-color: rgba(55, 65, 81, 0.8);
}

.nav-link.active {
    background-color: #9333ea;
    color: white;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.mobile-nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background-color: var(--accent-glass-bg);
    color: white;
}

.mobile-nav-link.active {
    background-color: var(--accent);
    color: white;
}

/* Form Elements */
.form-input {
    background-color: var(--accent-glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    border-radius: 0.75rem !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.form-input:focus {
    box-shadow: 0 0 0 2px var(--accent) !important;
    border-color: var(--accent-border) !important;
    outline: none;
}

.form-input::placeholder {
    color: rgba(232, 232, 245, 0.5);
}

/* Select Dropdown Styling */
select.form-input {
    cursor: pointer;
}

select.form-input option {
    background-color: var(--very-peri);
    color: white;
    padding: 8px 12px;
}

select.form-input option:hover {
    background-color: var(--accent);
}

select.form-input option:checked {
    background-color: var(--accent);
    color: white;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent-border);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--light-peri);
}

.btn-secondary {
    background-color: var(--dark-peri);
    border-color: var(--glass-border);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--very-peri);
}

.btn-accent {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: var(--text-light);
}

.btn-accent:hover {
    background-color: #16a34a;
}

.btn-accent {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    color: var(--text-light);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.btn:disabled {
    background-color: var(--darker-peri);
    color: rgba(232, 232, 245, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Radio Buttons */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    margin-right: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
}

input[type="radio"]:checked {
    border-color: var(--accent);
}

input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 0.65rem;
    height: 0.65rem;
    background-color: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    margin-right: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
}

input[type="checkbox"]:checked {
    border-color: var(--accent);
    background-color: var(--accent);
}

input[type="checkbox"]:checked::before {
    content: '✓';
    display: block;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile Radio & Checkbox */
@media (max-width: 768px) {
    input[type="radio"],
    input[type="checkbox"] {
        width: 1.5rem;
        height: 1.5rem;
        margin-right: 1rem;
    }

    input[type="radio"]:checked::before {
        width: 0.8rem;
        height: 0.8rem;
    }

    input[type="checkbox"]:checked::before {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    input[type="radio"],
    input[type="checkbox"] {
        width: 1.75rem;
        height: 1.75rem;
        margin-right: 1.25rem;
    }

    input[type="radio"]:checked::before {
        width: 0.9rem;
        height: 0.9rem;
    }

    input[type="checkbox"]:checked::before {
        font-size: 1rem;
    }
}

/* Tab Buttons */
.tab-button-group {
    background: var(--darker-peri);
    border-radius: 12px;
    padding: 4px;
    display: flex;
    margin-bottom: 16px;
}

.tab-button {
    flex: 1;
    padding: 8px 16px;
    border-radius: 9px;
    font-weight: 500;
    color: rgba(232, 232, 245, 0.7);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    transition: all 0.3s ease;
    background-color: var(--accent-glass-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
}

.upload-area.dragover {
    border-color: var(--accent-border);
    background-color: rgba(154, 155, 217, 0.25);
}

/* Content Sections - Standarisasi */
.content-section {
    background: var(--accent-glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Custom Scrollbar */
.content-section::-webkit-scrollbar {
    width: 8px;
}

.content-section::-webkit-scrollbar-track {
    background: var(--darker-peri);
    border-radius: 4px;
}

.content-section::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.content-section::-webkit-scrollbar-thumb:hover {
    background: var(--light-peri);
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 24px;
    flex-shrink: 0;
}

/* Result Card untuk standarisasi tampilan hasil */
.result-card {
    background: var(--darker-peri);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Refund Calculator Specific Styles */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.result-title {
    flex: 1;
}

.product-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0 0 4px 0;
}

.username-text {
    color: var(--accent);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.result-status {
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.results-column {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

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

.info-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: right;
}

.calculation-breakdown {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.breakdown-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.breakdown-value {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.final-result {
    background: linear-gradient(135deg, var(--accent) 0%, var(--light-peri) 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--accent-border);
    box-shadow: 0 4px 15px rgba(122, 110, 183, 0.3);
}

.final-result-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.final-result-amount {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Result Section untuk standarisasi */
#result-section .content-section {
    height: 550px;
}

@media (max-width: 768px) {
    #result-section .content-section {
        height: 500px;
    }
}

@media (max-width: 480px) {
    #result-section .content-section {
        height: 450px;
    }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    opacity: 0.7;
    font-size: 13px;
    flex-shrink: 0;
}

.footer p i {
    color: var(--accent);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(34, 197, 94, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: all 0.5s ease-in-out;
    z-index: 1000;
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    display: none;
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.hidden {
    display: none !important;
}

/* Short URL Styling */
.short-url {
    background: var(--accent-glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: monospace;
    color: var(--accent);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-main {
        padding: 25px 15px 30px 15px;
        margin: 5px;
        min-height: 600px;
    }

    .logo {
        height: 45px;
        width: 250px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .header-section {
        margin-bottom: 20px;
    }

    .content-section {
        padding: 20px;
        height: 500px;
    }

    .content-section h2 {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
        min-height: 44px;
    }

    .form-input {
        padding: 14px;
        font-size: 14px;
        min-height: 44px;
    }

    .tab-button-group {
        flex-direction: column;
        gap: 4px;
    }

    .tab-button {
        padding: 12px;
        min-height: 44px;
    }

    .upload-area {
        padding: 1.5rem;
    }

    .mobile-nav-link {
        font-size: 16px;
        padding: 12px 24px;
    }
}

@media (max-width: 480px) {
    .container-main {
        padding: 20px 12px 25px 12px;
        border-radius: 20px;
        min-height: 550px;
    }

    .logo {
        height: 50px;
        width: 250px;
    }

    .content-section {
        padding: 16px;
        height: 450px;
    }

    .content-section h2 {
        margin-bottom: 18px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 14px;
        min-height: 48px;
    }

    .form-input {
        padding: 16px;
        font-size: 14px;
        min-height: 48px;
    }

    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateX(100%);
    }

    .toast.show {
        transform: translateX(0);
    }
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 16px;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

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

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

/* Mobile Gap */
@media (max-width: 768px) {
    .gap-2 {
        gap: 12px;
    }

    .gap-4 {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .gap-2 {
        gap: 16px;
    }

    .gap-4 {
        gap: 24px;
    }
}

/* Spacing */
.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-6 {
    margin-top: 24px;
}

/* Mobile Spacing */
@media (max-width: 768px) {
    .mb-2 {
        margin-bottom: 12px;
    }

    .mb-4 {
        margin-bottom: 20px;
    }

    .mb-6 {
        margin-bottom: 30px;
    }

    .mt-2 {
        margin-top: 12px;
    }

    .mt-6 {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .mb-2 {
        margin-bottom: 16px;
    }

    .mb-4 {
        margin-bottom: 24px;
    }

    .mb-6 {
        margin-bottom: 36px;
    }

    .mt-2 {
        margin-top: 16px;
    }

    .mt-6 {
        margin-top: 36px;
    }
}

/* Text Utilities */
.text-sm {
    font-size: 14px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.font-bold {
    font-weight: bold;
}

.text-center {
    text-align: center;
}

.opacity-70 {
    opacity: 0.7;
}

.opacity-80 {
    opacity: 0.8;
}

/* Width Utilities */
.w-full {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

/* Break All for Long URLs */
.break-all {
    word-break: break-all;
}

/* Mobile Responsive for Refund Calculator */
@media (max-width: 768px) {
    .result-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .product-name {
        font-size: 1.25rem;
    }
    
    .final-result-amount {
        font-size: 1.5rem;
    }
    
    .results-column,
    .calculation-breakdown {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .result-card {
        padding: 16px;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .final-result {
        padding: 16px;
    }
    
    .final-result-amount {
        font-size: 1.25rem;
    }
}
