@font-face {
    font-family: 'FiraCode';
    src: url('fonts/FiraCode-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'FiraCode';
    src: url('fonts/FiraCode-Medium.ttf') format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: 'FiraCode';
    src: url('fonts/FiraCode-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'FiraCode';
    src: url('fonts/FiraCode-Bold.ttf') format('truetype');
    font-weight: 700;
}

body {
    font-family: 'FiraCode', sans-serif;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #0a0a0a;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
}

.overlay.active {
    display: block;
}

.container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    width: 115%;
    max-width: 600px;
    background: linear-gradient(145deg, #1c1c1c, #232323);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 90vh;
    overflow-y: auto;
}

.container.active {
    display: block;
}

.close-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    color: #ff4d4d;
    transition: all 0.3s ease;
    padding: 8px;
    z-index: 1001;
}

.close-icon:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.transaction-date {
    font-size: 0.8em;
    color: #b3b3b3;
    margin-bottom: 5px;
    text-align: center;
}

h2 {
    margin: 25px 0 30px;
    font-size: 2em;
    text-align: center;
    width: 100%;
    padding-top: 15px;
}

.form-group {
    margin-bottom: 25px;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95em;
    font-weight: 500;
    color: #b3b3b3;
    text-align: left;
}

input, select {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    margin-bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: rgba(42, 42, 42, 0.8);
    color: #ffffff;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: 'FiraCode', sans-serif;
}

input:focus, select:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

button {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'FiraCode', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    background: linear-gradient(45deg, #45a049, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.loader {
    border: 5px solid rgba(42, 42, 42, 0.5);
    border-top: 5px solid #4caf50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

.invoice-details {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 16px;
    padding: 30px;
    margin: 25px 0;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.invoice-details h3 {
    margin-top: 0;
    font-size: 1.5em;
    background: linear-gradient(45deg, #4caf50, #45a049);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid rgba(76, 175, 80, 0.3);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.05em;
}

.detail-row span:first-child {
    color: #b3b3b3;
    font-weight: 500;
}

.detail-row .address {
    max-width: 400px;
    text-align: right;
    color: #ffffff;
}

.detail-row.total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(76, 175, 80, 0.3);
    font-weight: 600;
    font-size: 1.2em;
}

.detail-row.total span {
    color: #4caf50;
}

.done-icon {
    font-size: 40px;
    color: #4caf50;
    text-align: center;
    margin: 20px 0;
    animation: scaleIn 0.5s ease;
    background: rgba(76, 175, 80, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 40px;
    line-height: 80px;
    margin: 0 auto 30px;
    border: 2px solid rgba(76, 175, 80, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Add smooth transitions for form steps */
.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    transform: translateY(20px);
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add responsive design */
@media (max-width: 768px) {
    body {
        padding: 20px 0;
        background-attachment: scroll;
    }

    .container {
        width: 90%;
        padding: 25px 20px;
    }

    h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    input, select {
        padding: 12px;
        font-size: 0.95em;
    }

    button {
        padding: 12px;
        font-size: 1em;
    }

    .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .detail-row .address {
        max-width: 100%;
        text-align: left;
    }

    .invoice-details {
        padding: 20px;
    }

    .done-icon {
        font-size: 60px;
        width: 100px;
        height: 100px;
        line-height: 100px;
    }

    .success-message {
        font-size: 1.3em;
    }

    .success-details {
        padding: 15px;
    }

    .success-details p {
        font-size: 0.95em;
    }

    /* Add smooth scrolling for mobile */
    .container {
        -webkit-overflow-scrolling: touch;
    }

    /* Improve touch targets */
    .close-icon {
        font-size: 18px;
        padding: 6px;
        top: 12px;
        right: 12px;
    }

    /* Add pull-to-refresh prevention */
    html, body {
        overscroll-behavior-y: contain;
    }

    /* Top Navigation */
    .top-nav {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .search-bar {
        display: none; /* Hide search bar on mobile */
    }

    .user-menu {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }
}

/* Add tablet-specific optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        width: 80%;
        padding: 30px;
    }

    .detail-row .address {
        max-width: 300px;
    }
}

/* Add landscape mode optimization */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px 0;
    }

    .container {
        max-height: 85vh;
        overflow-y: auto;
        padding: 20px;
    }

    .done-icon {
        font-size: 50px;
        width: 80px;
        height: 80px;
        line-height: 80px;
        margin-bottom: 15px;
    }

    h2 {
        margin-bottom: 15px;
    }
}

/* Add loading animation enhancement */
.loader {
    position: relative;
}

.loader:after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 3px solid rgba(76, 175, 80, 0.1);
    animation: pulse 1.5s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Update success step styling */
.success-container {
    text-align: center;
    padding: 10px 0;
    width: 100%;
}

.success-message {
    font-size: 1.1em;
    color: #4caf50;
    margin: 15px 0;
    font-weight: 500;
    line-height: 1.4;
}

.success-details {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.success-details p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #b3b3b3;
}

/* Style the dropdown options container */
select {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(42, 42, 42, 0.8);
    padding: 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

/* Custom select styling */
select:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Style for the dropdown list */
select option {
    background-color: #2a2a2a;
    color: white;
    padding: 15px 20px;
    margin: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Hover effect for options */
select option:hover {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
}

/* Selected option style */
select option:checked {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
}

/* Disabled state */
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: rgba(42, 42, 42, 0.4);
}

/* Custom arrow */
.form-group {
    position: relative;
}

.form-group::after {
    /* content: '▼'; */
    font-size: 0.8em;
    color: #4caf50;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* Arrow rotation when select is open */
.form-group select:focus + .form-group::after {
    transform: translateY(-50%) rotate(180deg);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 28, 28, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.loading-overlay p {
    margin-top: 20px;
    color: #4caf50;
    font-size: 1.1em;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

#step4 {
    position: relative;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    background-color: rgba(42, 42, 42, 0.8);
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-selected:hover {
    border-color: rgba(76, 175, 80, 0.5);
}

.select-selected:after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    transition: transform 0.3s ease;
}

.select-selected.select-arrow-active:after {
    transform: translateY(-50%) rotate(180deg);
}

.select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    margin-top: 8px;
    background: rgba(42, 42, 42, 0.95);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.select-items.select-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-item {
    padding: 12px 15px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, transparent, transparent);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.select-item:hover {
    background: linear-gradient(45deg, #4caf50, #45a049);
    transform: translateX(5px);
}

.select-item.selected {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    background-color: #0a0a0a;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #1c1c1c;
    padding: 15px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    font-size: 1.3em;
    color: #4caf50;
    margin-bottom: 30px;
}

.logo i {
    font-size: 1.5em;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

/* Add margin before logout button */
.sidebar nav .logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #b3b3b3;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #1c1c1c;
    border-radius: 12px;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 8px;
    padding: 8px 12px;
    width: 250px;
}

.search-bar input {
    background: none;
    border: none;
    color: white;
    margin-left: 10px;
    width: 100%;
}

.search-bar input:focus {
    outline: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Balance Overview */
.balance-overview {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 12px;
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.total-balance {
    font-size: 2em;
    margin: 10px 0;
    color: white;
}

.balance-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1em;
}

.balance-change.positive {
    color: #4caf50;
}

.balance-change span {
    color: #b3b3b3;
    font-size: 0.9em;
}

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    grid-column: 1 / -1;
}

.card {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.card i {
    font-size: 1.7em;
    color: #4caf50;
    margin-bottom: 12px;
}

.card h3 {
    margin: 8px 0;
    color: white;
}

.card p {
    color: #b3b3b3;
    margin: 0;
    font-size: 0.85em;
}

/* Portfolio Section */
.portfolio-section {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    grid-column: 1 / -1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.portfolio-card {
    background: rgba(42, 42, 42, 0.8);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.portfolio-card img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.crypto-info {
    flex: 1;
}

.crypto-info h3 {
    margin: 0 0 5px;
    font-size: 1em;
}

.balance {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crypto-amount {
    color: white;
    font-weight: 500;
}

.usd-value {
    color: #b3b3b3;
    font-size: 0.9em;
}

.price-change {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    font-weight: 500;
    color: #b3b3b3;
}

.price-change.positive {
    color: #4caf50;
}

.price-change.negative {
    color: #ff4d4d;
}

/* Price Chart Section */
.price-chart-section {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.chart-container {
    margin-top: 15px;
    height: 250px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }

    .sidebar .logo span,
    .sidebar nav a span {
        display: none;
    }

    .logo {
        justify-content: center;
        padding: 10px;
    }

    .main-content {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    /* Dashboard Layout */
    .dashboard {
        flex-direction: column;
    }

    /* Hide Sidebar on Mobile */
    .sidebar {
        display: none; /* Completely hide the sidebar on mobile */
    }

    /* Main Content */
    .main-content {
        margin-left: 0;
        padding: 15px; /* Reduce top padding since there's no sidebar */
        width: 100%;
    }

    /* Top Navigation */
    .top-nav {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .search-bar {
        display: none; /* Hide search bar on mobile */
    }

    .user-menu {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }

    /* Balance Overview */
    .balance-overview {
        padding: 20px;
        margin-bottom: 20px;
    }

    .total-balance {
        font-size: 1.8em;
    }

    /* Action Cards */
    .action-cards {
        grid-template-columns: repeat(3, 1fr); /* Show all three cards in one row */
        gap: 10px;
    }

    .card {
        padding: 15px;
        text-align: center;
        height: auto;
    }

    .card i {
        font-size: 1.5em;
        margin-bottom: 5px;
    }

    .card h3 {
        margin: 0;
        font-size: 0.9em;
    }

    .card p {
        display: none; /* Hide card descriptions on mobile */
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .portfolio-card {
        padding: 15px;
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    /* Rest of your mobile styles... */
}

@media (min-width: 769px) and (max-width: 1024px) {
    .action-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Add smooth scrollbar for the container */
.container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.container::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.5);
    border-radius: 4px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.7);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
}

.toast {
    min-width: 300px;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #1c1c1c;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease forwards;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #ff4d4d;
}

.toast i {
    font-size: 1.2em;
}

.toast.success i {
    color: #4caf50;
}

.toast.error i {
    color: #ff4d4d;
}

.toast.slide-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile view adjustments for form container */
@media (max-width: 768px) {
    .container {
        width: 92%;
        padding: 20px 15px;
        margin: 0;
        max-height: 85vh;
        overflow-y: auto;
    }

    /* Form Header */
    .container h2 {
        font-size: 1.3em;
        margin: 20px 0 25px;
        padding: 0;
    }

    /* Form Groups */
    .form-group {
        margin-bottom: 18px;
        padding: 0;
        width: 100%;
    }

    /* Labels */
    label {
        font-size: 0.9em;
        margin-bottom: 6px;
    }

    /* Inputs and Selects */
    input, 
    select,
    .select-selected {
        padding: 12px;
        font-size: 0.95em;
        height: 45px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Custom Select Container */
    .custom-select {
        margin-bottom: 18px;
    }

    /* Invoice Details */
    .invoice-details {
        padding: 15px;
        margin: 20px 0;
        width: 100%;
        box-sizing: border-box;
    }

    .invoice-details h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .detail-row {
        padding: 10px 0;
        font-size: 0.9em;
        flex-direction: row; /* Keep rows in single line */
        align-items: center;
        gap: 10px;
    }

    .detail-row .address {
        font-size: 0.85em;
        word-break: break-word;
        text-align: right;
    }

    /* Buttons */
    button {
        padding: 14px;
        font-size: 1em;
        margin: 15px 0;
        height: 45px;
        width: 100%;
    }

    /* Success Screen */
    .success-container {
        padding: 15px 0;
    }

    .done-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 30px;
        margin: 15px auto;
    }

    .success-message {
        font-size: 1em;
        margin: 15px 0;
        padding: 0 10px;
    }

    .success-details {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Small phones optimization */
@media (max-width: 380px) {
    .container {
        width: 94%;
        padding: 15px 12px;
    }

    .container h2 {
        font-size: 1.2em;
        margin: 18px 0 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    input, 
    select,
    .select-selected {
        padding: 10px;
        height: 42px;
    }

    .invoice-details {
        padding: 12px;
        margin: 15px 0;
    }

    .detail-row {
        padding: 8px 0;
        font-size: 0.85em;
    }

    button {
        padding: 12px;
        height: 42px;
    }
}

/* Editable portfolio values */
.crypto-amount span[contenteditable="true"] {
    cursor: text;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    min-width: 20px;
}

.crypto-amount span[contenteditable="true"]:hover {
    background: rgba(76, 175, 80, 0.1);
}

.crypto-amount span[contenteditable="true"]:focus {
    background: rgba(42, 42, 42, 0.8);
    outline: none;
    border: 1px solid #4caf50;
}

/* Editable username */
.user-profile span[contenteditable="true"] {
    cursor: text;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 20px;
}

.user-profile span[contenteditable="true"]:hover {
    background: rgba(76, 175, 80, 0.1);
}

.user-profile span[contenteditable="true"]:focus {
    background: rgba(42, 42, 42, 0.8);
    outline: none;
    border: 1px solid #4caf50;
}

/* Mobile Responsive Design - Main Layout */
@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
    }

    /* Main Content Layout */
    .main-content {
        padding: 10px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Top Navigation */
    .top-nav {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .user-menu {
        padding: 5px 0;
    }

    /* Balance Overview */
    .balance-overview {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .total-balance {
        font-size: 1.6em;
    }

    /* Action Cards */
    .action-cards {
        gap: 8px;
        margin-bottom: 15px;
    }

    .card {
        padding: 12px 8px;
        border-radius: 8px;
    }

    .card i {
        font-size: 1.3em;
        margin-bottom: 4px;
    }

    .card h3 {
        font-size: 0.8em;
    }

    /* Portfolio Section */
    .portfolio-section {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .portfolio-grid {
        gap: 10px;
    }

    .portfolio-card {
        padding: 12px;
        border-radius: 8px;
    }

    .portfolio-card img {
        width: 30px;
        height: 30px;
    }

    .crypto-info h3 {
        font-size: 0.9em;
    }

    .balance {
        font-size: 0.85em;
    }

    /* Form Container Mobile Optimization */
    .container {
        width: 92%;
        height: auto;
        min-height: 200px;
        max-height: 90vh;
        margin: 0;
        padding: 15px;
        border-radius: 12px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        overflow-y: auto;
        background: #1c1c1c;
    }

    .form-step {
        padding: 10px 0;
    }

    .container h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    .form-group input,
    .select-selected {
        padding: 10px;
        font-size: 0.9em;
        height: 40px;
    }

    .next-btn {
        padding: 12px;
        font-size: 0.95em;
        margin: 15px 0;
        height: 45px;
    }

    /* Toast Notifications */
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .toast {
        min-width: 0;
        width: 100%;
        margin-bottom: 8px;
        padding: 12px 15px;
        font-size: 0.9em;
    }

    /* Success Screen */
    .success-container {
        padding: 10px;
    }

    .done-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 30px;
        margin-bottom: 15px;
    }

    .success-message {
        font-size: 1em;
        margin: 12px 0;
    }

    .success-details {
        padding: 12px;
        margin: 12px 0;
    }

    /* Invoice Details */
    .invoice-details {
        padding: 12px;
        margin: 12px 0;
    }

    .detail-row {
        padding: 8px 0;
        font-size: 0.9em;
    }

    /* Overlay */
    .overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Small phones optimization */
@media (max-width: 380px) {
    .main-content {
        padding: 8px;
    }

    .container {
        width: 94%;
        padding: 12px;
    }

    .card h3 {
        font-size: 0.75em;
    }

    .card i {
        font-size: 1.2em;
    }

    .total-balance {
        font-size: 1.4em;
    }

    .portfolio-card {
        padding: 10px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .next-btn {
        padding: 10px;
        margin: 12px 0;
    }
}

/* Handle very small screens */
@media (max-width: 320px) {
    .card {
        padding: 8px 5px;
    }

    .card i {
        font-size: 1.1em;
    }

    .card h3 {
        font-size: 0.7em;
    }

    .container {
        width: 96%;
        padding: 10px;
    }
}

/* Handle landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        height: 85vh;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .form-group {
        margin-bottom: 8px;
    }

    .next-btn {
        margin: 10px 0;
    }
}

.form-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    padding: 5px;
    color: #333;
}

@media screen and (max-width: 768px) {
    .form-container {
        width: 95%;
        padding: 15px;
    }
    
    .close-icon {
        font-size: 18px;
        top: 8px;
        right: 8px;
    }
    
    .form-container form {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .form-container input,
    .form-container textarea,
    .form-container button {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}
