/* Global Box-Sizing Fix */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Base Theme for Content Area */
.main-content {
    background: #0f172a;
    min-height: 100vh;
    padding: 2rem;
    width: 100%;
    color: #f8fafc;
    overflow-x: hidden;
}

.locker-heading {
    text-align: center !important;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.subtitle {
    text-align: center !important;
    color: #94a3b8;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* Main Container - FLEXBOX WRAP LAYOUT */
.main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 50px rgba(139, 92, 246, 0.3);
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Box Sizes */
.section-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease, box-shadow 0.5s ease;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15), inset 0 0 10px rgba(59, 130, 246, 0.05);
}

.section-box:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4), inset 0 0 15px rgba(59, 130, 246, 0.1);
}

/* Full Width Boxes */
.full-width {
    flex: 1 1 100%;
    width: 100%;
}

/* Large Boxes - 2/3 width (fits 1 per row with a small box) */
.box-large {
    flex: 1 1 calc(66.666% - 1.33rem);
    min-width: 500px;
}

/* Small Boxes - 1/3 width (fits 3 per row) */
.box-small {
    flex: 1 1 calc(33.333% - 1.33rem);
    min-width: 300px;
}

.section-title {
    color: #3b82f6;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Why Lock Section: 4 cards in ONE ROW */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.info-card {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid #10b981;
    transition: all 0.3s ease;
    text-align: center;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2), 0 0 15px rgba(16, 185, 129, 0.3);
}

.info-card h4 {
    color: #10b981;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    text-align: center;
}

.info-card p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}

.info-card p {
    color: #cbd5e1 !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    text-align-last: center !important;
}

.info-card h4 {
    color: #10b981 !important;
    margin-bottom: 0.75rem !important;
    font-size: 1.1rem !important;
    text-align: center !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

.info-card {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid #10b981;
    transition: all 0.3s ease;
    text-align: center !important;
}


/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1rem;
}

.required {
    color: #ef4444;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:invalid {
    border-color: #ef4444;
}

small {
    color: #94a3b8;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.5rem;
}

/* Percentage Buttons */
.percentage-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.percentage-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.percentage-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

/* Duration Cards */
.duration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.duration-card {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.duration-card:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.duration-card.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 0 10px rgba(59, 130, 246, 0.1);
}

.duration-card .period {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.duration-card .label {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Preview Section */
.preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    border-left: 3px solid rgba(59, 130, 246, 0.5);
}

.preview-item.highlight {
    border-left-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.preview-item strong {
    color: #e2e8f0;
    font-size: 0.9rem;
}

.preview-item span:last-child {
    color: #10b981;
    font-weight: 600;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
    font-size: 0.85rem;
}

/* Fee Calculator */
.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.fee-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #10b981;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid rgba(16, 185, 129, 0.3);
}

.fee-note {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 1rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Terms Section */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border-left: 3px solid #ef4444;
    transition: all 0.3s ease;
}

.terms-checkbox:hover {
    background: rgba(15, 23, 42, 0.6);
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    transform: scale(1.3);
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.terms-checkbox label {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
    margin: 0;
    cursor: pointer;
}

/* Lock Button */
.lock-button {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6, #8b5cf6, #d97706);
    color: white;
    padding: 1.5rem;
    width: 100%;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1 1 100%;
}

.lock-button:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.lock-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Wallet Status */
.wallet-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.wallet-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

#wallet-status-text {
    flex-grow: 1;
}

.wallet-status .connect-status-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.wallet-status .connect-status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

#liquidity-locker-form {
    display: contents;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .box-large,
    .box-small {
        flex: 1 1 calc(50% - 1rem);
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }

   @media (max-width: 1200px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .box-large,
    .box-small {
        flex: 1 1 calc(50% - 1rem);
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }

    .section-box,
    .box-large,
    .box-small {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .duration-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wallet-status {
        flex-direction: column;
        align-items: stretch;
    }

    .locker-heading {
        font-size: 2rem;
    }
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-box {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.section-box:nth-child(1) { animation-delay: 0.1s; }
.section-box:nth-child(2) { animation-delay: 0.2s; }
.section-box:nth-child(3) { animation-delay: 0.3s; }
.section-box:nth-child(4) { animation-delay: 0.4s; }
.section-box:nth-child(5) { animation-delay: 0.5s; }
.section-box:nth-child(6) { animation-delay: 0.6s; }
.section-box:nth-child(7) { animation-delay: 0.7s; }
.section-box:nth-child(8) { animation-delay: 0.8s; }
.section-box:nth-child(9) { animation-delay: 0.9s; }
