.lana-header {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    display: block;
    text-align: center;
}

.lana-elf-image {
    width: 100%;
    max-width: 950px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.header-text {
    color: white;
    font-size: 2.5rem;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    font-weight: bold;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

.step-indicator li {
    flex: 1;
    position: relative;
    padding-top: 3rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    z-index: 1;
}

/* Improve mobile display of step indicators */
@media (max-width: 767px) {
    .step-indicator li {
        font-size: 0.7rem;
    }
}

/* Hide text on very small screens */
@media (max-width: 480px) {
    .step-indicator li {
        font-size: 0;
        padding-top: 2.5rem;
    }
    .step-indicator li.active {
        font-size: 0.7rem;
    }
}

.step-indicator li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #6c757d;
    z-index: 1;
}

.step-indicator li.active {
    color: #28a745;
    font-weight: bold;
}

.step-indicator li.active::before {
    background-color: #28a745;
    border-color: #28a745;
}

.step-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.step-instructions {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
    border-radius: 4px;
}

.offline-mode {
    background-color: #fff3cd;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    border: 1px solid #ffeeba;
}

.qr-scanner-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    background: #000;
}

#error-message {
    display: none;
    color: #dc3545;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #dc3545;
    border-radius: 4px;
}

#qr-scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#qr-scanner-modal .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 95%;
    max-width: 600px;
    text-align: center;
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    /* Removed mirroring effect */
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid #fff;
    border-radius: 20px;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
}

.scanner-instructions {
    color: #fff;
    text-align: center;
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* Pending Transaction Warning Styles */
#pendingTransactionWarning {
    border-left: 4px solid #f0ad4e;
    background-color: #fcf8e3;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

#pendingTransactionWarning h4 {
    color: #8a6d3b;
    margin-top: 0;
    font-weight: bold;
}

#pendingTransactionWarning p {
    margin-bottom: 10px;
}

#pendingTransactionWarning #countdown {
    font-family: monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #d9534f;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(240, 173, 78, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(240, 173, 78, 0);
    }
}

#checkAgainButton {
    margin-top: 10px;
}

/* Fix for long transaction IDs */
.transaction-id {
    display: flex;
    flex-direction: column;
}

.transaction-id span {
    margin-bottom: 5px;
    font-weight: bold;
}

.text-break {
    word-break: break-all !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100%;
    display: inline-block;
}

/* Documentation Styles */
.documentation-content {
    background-color: #fff;
    color: #333;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.documentation-content h1, 
.documentation-content h2, 
.documentation-content h3, 
.documentation-content h4 {
    color: #28a745;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.documentation-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

.documentation-content code {
    color: #d63384;
    background-color: rgba(214, 51, 132, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
}

.documentation-content pre code {
    color: #212529;
    background-color: transparent;
    padding: 0;
}

.documentation-content table {
    margin-bottom: 1.5rem;
}

/* Navbar styling */
.navbar-brand img {
    margin-right: 8px;
}

.navbar-dark {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 767px) {
    .documentation-content {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* QR scan notification */
.qr-scan-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2000;
    font-weight: bold;
    text-align: center;
    animation: fadeInOut 3s forwards;
    max-width: 90%;
    width: 500px;
}

/* Error notification style */
.qr-scan-notification.qr-scan-error {
    background-color: #f44336;
    animation: fadeInOut 5s forwards;
    border-left: 5px solid #ffeb3b;
    padding: 20px 25px;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Mobile responsive button styling */
@media (max-width: 767px) {
    /* Increase button height for better touch targets */
    .btn {
        padding: 0.6rem 1rem;
        margin-bottom: 0.5rem;
        font-size: 1rem;
        min-height: 44px; /* Minimum touch target size */
    }
    
    /* Make buttons stack on small screens */
    .mt-3, .mt-4 {
        display: flex;
        flex-direction: column;
    }
    
    /* Add spacing between adjacent buttons */
    .btn + .btn {
        margin-left: 0 !important;
        margin-top: 0.75rem;
    }
    
    /* Special case for specific step containers */
    #step2 .mt-3, #step3 .mt-3, #step4 .mt-3 {
        display: flex;
        flex-direction: column;
    }
    
    /* Input groups with buttons */
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group > .btn {
        margin-top: 0.5rem;
        border-top-left-radius: 0.25rem !important;
        border-top-right-radius: 0.25rem !important;
        border-bottom-left-radius: 0.25rem !important;
        border-bottom-right-radius: 0.25rem !important;
        flex: 0 0 100%;
    }
    
    /* Step content padding adjustment */
    .step-content {
        padding: 1rem;
    }
    
    /* Enhance tap targets in forms */
    input, select, textarea, .form-control {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        min-height: 44px;
    }
    
    /* QR scanner button positioning */
    .input-group .btn-secondary {
        margin-left: 0;
        width: 100%;
    }
}

/* Extra styles for very small screens */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    .btn-lg {
        font-size: 1.1rem;
    }
    
    /* Further reduce padding for very small screens */
    .step-content {
        padding: 0.8rem;
    }
}

/* Fix for the adjacent buttons in all steps */
.signed-transaction-container button,
#step2 button,
#step3 button,
#step4 button,
#step5 button {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Specifically target button arrangements for mobile */
@media (max-width: 767px) {
    /* Adjust buttons in step 3 (sign transaction) */
    #privateKeyInputSection {
        display: flex;
        flex-direction: column;
    }
    
    #privateKeyInputSection .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Ensure button in step 2 stack properly */
    #step2 .mt-3 {
        display: flex;
        flex-direction: column;
    }
    
    #step2 .mt-3 button {
        width: 100%;
        margin-right: 0 !important;
    }
    
    /* Fix specific issues in step 3 */
    #confirmSignature {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Make the transaction broadcast button full-width on mobile */
    #broadcastButton {
        width: 100% !important;
    }
    
    /* Fix for long transaction IDs */
    .transaction-id {
        display: flex;
        flex-direction: column;
    }
    
    .transaction-id span {
        margin-bottom: 5px;
        font-weight: bold;
    }
    
    .text-break {
        word-break: break-all !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100%;
        display: inline-block;
    }
}