* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* System fonts */
}

body.modern-ui {
    background-color: #bacfcf;
    color: #2d3748;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

body.dark-mode {
    background-color: #0f1621; /* Dark mode background */
    color: #f8fafc;           /* Dark mode text color */
}

/* Toggle dark mode styles for all major elements */
body.dark-mode .header {
    background-color: #1e293b;
    border-bottom: 1px solid #475569;
}

body.dark-mode .connect-btn {
    background-color: #3182ce;
    color: white;
}

body.dark-mode .nav-item, body.dark-mode .nav2-item {
    background-color: #374151;
    color: #f8fafc;
}

body.dark-mode .nav-item:hover, body.dark-mode .nav2-item:hover {
    background-color: #4b5563;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

body.dark-mode .content-area, body.dark-mode .content-wrapper, body.dark-mode .tab-nav, body.dark-mode .content-area p  {
    background-color: #1e293b;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

body.dark-mode .config-panel {
    background-color: #1e293b;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

body.dark-mode .block-time-btn {
    background-color: #475569;
    color: #f8fafc;
}

body.dark-mode .contract-btn {
    background-color: #3182ce;
    border-radius: 6px;
    color: white;
}

body.dark-mode .tx-info-section textarea {
    background-color: #1e293b;
    border: 1px solid #475569;
    color: #f8fafc;
}

.dark-mode .result {
    background: #1f2937; /* Dark mode equivalent */
}

.main-container {
    width: 100%;
    max-width: 1400px;
    display: grid;
    grid-template-columns: 3fr 7fr;
    gap: 2rem;
    margin: auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.5rem;
    color: #3182ce;
    font-weight: bold;
}

.connect-btn {
    background-color: #6366f1;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.connect-btn:hover {
    background-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Tab Navigation */
.tab-nav {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.tab-section {
    margin-bottom: 1rem;
}

.tab-section h2 {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    border-left: 4px solid #3182ce;
    padding-left: 0.75rem;
}

/* Navigation Button Styles */
.nav-item, .nav2-item {
    background-color: #e2e8f0;
    color: #2d3748;
	margin-right: 4px;
	margin-top: 4px;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover, .nav2-item:hover {
    background-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content Area */
.content-area {
    flex-grow: 1;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.content-area p {
    text-align: center;
    font-size: 1rem;
    color: #4a5568;
}

/* Configuration Panel */
.config-panel {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-size: 0.9rem;
    color: #4a5568;
}

.setting-group input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
}

.setting-group .note {
    font-size: 0.8rem;
    color: #64748b;
}

.block-time-btn {
    background-color: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2d3748;
}

.block-time-btn:hover {
    background-color: #e5e7eb;
}

.contract-btn {
    background-color: #6366f1;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.contract-btn:hover {
    background-color: #4f46e5;
    box-shadow: 0 3px 8px rgba(99,102,241,0.3);
}

/* Transaction Info */
.tx-info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.tx-info-section textarea {
    resize: vertical;
    font-family: monospace;
    background-color: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.95rem;
}

.tx-info-section button {
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.tx-info-section button:hover {
    background-color: #1e40af;
    box-shadow: 0 3px 8px rgba(49, 130, 206, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .config-panel,
    .tx-info-section {
        order: 2;
        margin-top: 1rem;
    }
}

.btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.btn:hover {
    background: #c0392b;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ecf0f1;
    border-radius: 6px;
    word-break: break-all;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}
