/* Modern Design System for Roblox Tools */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - WCAG Compliant */
    --bg-main: #000000;
    --bg-card: rgba(255, 255, 255, 0.03);
    /* True Glassmorphism - lighter */
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-overlay: rgba(15, 17, 19, 0.85);

    --primary: #00b06f;
    --primary-gradient: linear-gradient(135deg, #00b06f 0%, #00e08e 100%);
    --primary-hover: #009e63;
    --primary-text: #ffffff;

    --secondary: #3b82f6;
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);

    --accent: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);

    --danger: #ff4757;
    --danger-gradient: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);

    /* Text Colors */
    --text-main: #ffffff;
    /* AAA Contrast on Black */
    --text-muted: #d1d5db;
    /* ~10:1 Contrast */
    --text-placeholder: #9ca3af;
    /* ~7:1 Contrast */

    --border-color: rgba(255, 255, 255, 0.1);

    /* Spacing System (Compact) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    /* Reduced from 1.25rem */
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    /* Reduced from 2rem */
    --space-8: 2.5rem;
    --space-10: 3rem;
    --space-12: 4rem;

    /* Typography Scale (Smaller elements) */
    --text-xs: 0.65rem;
    --text-sm: 0.75rem;
    --text-base: 0.85rem;
    /* Reduced base size */
    --text-lg: 1rem;
    --text-xl: 1.1rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.5rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 15px rgba(0, 176, 111, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    font-size: var(--text-base);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* Utilities */
.text-center {
    text-align: center;
}

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

.text-muted {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.flex {
    display: flex;
}

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

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

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

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

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.w-full {
    width: 100%;
}

/* Layout Containers */
.wrapper {
    width: 100%;
    max-width: 850px;
    /* Tighter max-width */
    margin: 0 auto;
    padding: var(--space-4);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    /* Reduced padding */
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

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

/* Form Elements */
.form-group {
    margin-bottom: var(--space-4);
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    /* Thinner border */
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    /* Compact padding */
    color: var(--text-main);
    font-size: var(--text-base);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 176, 111, 0.15);
    /* Subtler focus ring */
}

.form-input::placeholder {
    color: var(--text-placeholder);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    /* Compact padding */
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-sm);
    /* Slightly smaller text */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--primary-text);
    box-shadow: 0 4px 12px rgba(0, 176, 111, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 176, 111, 0.4);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.4);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.7rem 1.5rem;
    /* Match height with others */
}

.btn-ghost:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-snow {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    /* Blue-Purple Gradient */
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-snow:hover {
    transform: scale(1.05);
    /* Hover Scale */
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
}

.btn-snow i {
    transition: transform 0.5s ease;
}

.btn-snow:hover i {
    transform: rotate(180deg);
    /* Snowflake rotation effect */
}

/* Grid System for Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Tighter grid */
    gap: var(--space-6);
    width: 100%;
}

/* Avatar Component */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-5);
}

.avatar-wrapper {
    position: relative;
    margin-bottom: var(--space-3);
}

.avatar-img {
    width: 90px;
    /* Smaller avatar */
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary);
    object-fit: cover;
    background: var(--bg-input);
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

/* Info List */
.info-list {
    width: 100%;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    /* Compact padding */
    border-bottom: 1px solid var(--border-color);
}

.info-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--text-main);
    font-size: var(--text-base);
}

/* Secure Badge */
.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 176, 111, 0.1);
    border: 1px solid rgba(0, 176, 111, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

/* Calculator Specifics */
.calc-container {
    text-align: center;
}

.calc-display {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.calc-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.05) 50%, transparent 52%);
    background-size: 200% 200%;
    animation: shine 3s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% {
        background-position: 200% 200%;
    }

    100% {
        background-position: -200% -200%;
    }
}

.exchange-icon {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
}

.summary-box {
    background: rgba(0, 176, 111, 0.1);
    border: 1px solid rgba(0, 176, 111, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1.5rem;
}

.summary-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Snowfall Container */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: white;
    border-radius: 50%;
    opacity: 0.8;
}

/* Parallax Layers */
.snowflake.layer-1 {
    font-size: 0.8em;
    opacity: 0.9;
    z-index: 3;
    animation: fall linear forwards;
    filter: blur(0.5px);
}

.snowflake.layer-2 {
    font-size: 0.5em;
    opacity: 0.6;
    z-index: 2;
    animation: fall linear forwards;
    filter: blur(1px);
}

.snowflake.layer-3 {
    font-size: 0.3em;
    opacity: 0.4;
    z-index: 1;
    animation: fall linear forwards;
    filter: blur(2px);
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 19, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-box {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    width: 90%;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-icon {
    font-size: 3.5rem;
    color: var(--danger);
    margin-bottom: 1.5rem;
    display: block;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.modal-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Animations */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom-in {
    animation: zoomIn 0.4s ease-out forwards;
}


/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .avatar-img {
        width: 100px;
        height: 100px;
    }

    h1 {
        font-size: 1.75rem;
    }

    /* Navbar Responsive */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem !important;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: auto;
    }
}

/* Navbar Styles */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-full);
    padding: 1rem 2rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 10px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
    /* Force scroll on small screens */
}

.history-table th {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8rem;
}

.history-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}

.history-table tr:last-child td {
    border-bottom: none;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.toast-message {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-main);
}