body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #FFF;
    font-family: 'Roboto', sans-serif;
    color: #666666;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

.loading-container {
    display: table;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    align-content: center;
    vertical-align: middle;
    text-align: center;
}

.loading {
    display: table-cell;
    vertical-align: middle;
    margin: 0 auto;
}

/* Material-like tab styling (deeppurple-amber theme) */
.nav-tabs {
    border-bottom: none;
}

.nav-tabs .nav-link {
    color: rgba(0, 0, 0, 0.6);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: rgba(103, 58, 183, 0.4);
    color: rgba(0, 0, 0, 0.87);
}

.nav-tabs .nav-link.active {
    color: #673AB7;
    border-bottom-color: #673AB7;
    background-color: transparent;
}

/* Material-like form fields (fill appearance) */
.form-control, .form-select {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.42);
    border-radius: 4px 4px 0 0;
    background-color: rgba(0, 0, 0, 0.04);
    padding: 1.25rem 0.75rem 0.25rem;
    color: rgba(0, 0, 0, 0.87);
}

.form-control:focus, .form-select:focus {
    border-bottom: 2px solid #673AB7;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.07);
}

.form-label {
    color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    margin-bottom: 0;
}

/* Material-like buttons (deeppurple-amber) */
.btn-primary {
    background-color: #673AB7;
    border-color: #673AB7;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),
                0 2px 2px 0 rgba(0,0,0,.14),
                0 1px 5px 0 rgba(0,0,0,.12);
}

.btn-primary:hover {
    background-color: #5E35B1;
    border-color: #5E35B1;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),
                0 4px 5px 0 rgba(0,0,0,.14),
                0 1px 10px 0 rgba(0,0,0,.12);
}

.btn-secondary {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
    color: rgba(0, 0, 0, 0.87);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),
                0 2px 2px 0 rgba(0,0,0,.14),
                0 1px 5px 0 rgba(0,0,0,.12);
}

.btn-secondary:hover {
    background-color: #d5d5d5;
    border-color: #d5d5d5;
    color: rgba(0, 0, 0, 0.87);
}

.btn-warning {
    background-color: #FFC107;
    border-color: #FFC107;
    color: rgba(0, 0, 0, 0.87);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),
                0 2px 2px 0 rgba(0,0,0,.14),
                0 1px 5px 0 rgba(0,0,0,.12);
}

/* Material-like card */
.card {
    border: none;
    box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),
                0 1px 1px 0 rgba(0,0,0,.14),
                0 1px 3px 0 rgba(0,0,0,.12);
    border-radius: 4px;
}

.tool-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 5px;
}

.button-column {
    width: 30%;
    min-width: 120px;
    margin-top: 5px;
    padding: 5px;
}

.content-column {
    flex: 1;
    padding-left: 20px;
    min-width: 200px;
}

.google-map {
    height: 300px;
    width: 100%;
    margin-top: 15px;
}

.bottomtext {
    padding-top: 20px;
    width: 100%;
    text-align: right;
}

.bottomtext p {
    font-size: 10pt;
}

.bottomtext figcaption {
    font-size: 8pt;
    padding-top: 0;
    margin-top: -10px;
}

.bottomtext figcaption {
    font-size: 8pt;
    padding-top: 0;
    margin-top: -10px;
}

code {
    color: #e01a76;
}

/* Active nav link highlight */
.navbar-nav .nav-link.active {
    color: #673AB7 !important;
    font-weight: 500;
    border-bottom: 2px solid #673AB7;
}

/* Generating overlay */
.generating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generating-panel {
    background: #fff;
    border-radius: 8px;
    padding: 2rem 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.generating-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(103, 58, 183, 0.2);
    border-top-color: #673AB7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.generating-text {
    font-size: 16px;
    font-weight: 500;
    color: #673AB7;
    letter-spacing: 0.5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Diff tool */
.diff-output {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.diff-line {
    display: flex;
    line-height: 1.6;
    white-space: pre;
}

.diff-ln {
    display: inline-block;
    min-width: 40px;
    text-align: right;
    padding: 0 8px;
    color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.04);
    user-select: none;
    border-right: 1px solid #eee;
}

.diff-text {
    padding: 0 8px;
    flex: 1;
}

.diff-added {
    background-color: #e6ffec;
}

.diff-added .diff-ln {
    background-color: #ccffd8;
}

.diff-removed {
    background-color: #ffebe9;
}

.diff-removed .diff-ln {
    background-color: #ffd7d5;
}

.diff-equal {
    background-color: transparent;
}

/* Markdown preview */
.markdown-preview {
    min-height: 100px;
    max-height: 500px;
    overflow-y: auto;
    line-height: 1.6;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
    color: #333;
    margin-top: 0.8em;
    margin-bottom: 0.4em;
}

.markdown-preview h1 { font-size: 1.8em; border-bottom: 1px solid #eee; padding-bottom: 0.3em; }
.markdown-preview h2 { font-size: 1.4em; border-bottom: 1px solid #eee; padding-bottom: 0.2em; }
.markdown-preview h3 { font-size: 1.2em; }

.markdown-preview code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.markdown-preview pre {
    background: rgba(0, 0, 0, 0.06);
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
}

.markdown-preview pre code {
    background: none;
    padding: 0;
}

.markdown-preview blockquote {
    border-left: 4px solid #673AB7;
    padding-left: 16px;
    color: #666;
    margin: 0.5em 0;
}

.markdown-preview table {
    border-collapse: collapse;
    width: 100%;
}

.markdown-preview th,
.markdown-preview td {
    border: 1px solid #ddd;
    padding: 6px 12px;
    text-align: left;
}

.markdown-preview th {
    background: rgba(0, 0, 0, 0.04);
}

/* OTP code display */
.otp-result {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    color: #673AB7;
    font-weight: 700;
}
