/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    padding: 0;
}

.main-header {
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    padding: 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    margin-top: 5px;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Left Panel - Token Input */
.left-panel {
    flex: 1;
    max-width: 500px;
}

.input-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.input-container {
    margin-bottom: 15px;
    position: relative;
}

.jwt-input {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease;
    background: #fafbfc;
}

.jwt-input:focus {
    outline: none;
    border-color: #0066cc;
    background: #fff;
}

/* JWT Token Color Formatting */
.jwt-formatted {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    padding: 15px;
    border-radius: 4px;
    background: transparent;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: hidden;
}

.jwt-code-block {
    margin-top: 8px;
    background: #fff;
    color: #333;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    padding: 12px 16px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    min-height: 32px;
}

.jwt-code-block code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

.jwt-header { color: #28a745; font-weight: 600; }
.jwt-payload { color: #fff; }
.jwt-signature { color: #3399ff; font-weight: 600; }
.jwt-separator { color: #666; }

.input-actions {
    display: flex;
    justify-content: flex-end;
}

/* Right Panel - Decoded Sections */
.right-panel {
    flex: 1;
    max-width: 600px;
}

.decoded-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.decoded-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.section-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.section-content {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.json-content {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    background: #fafbfc;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e1e5e9;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.signature-content {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e1e5e9;
    word-break: break-all;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    color: #666;
    text-decoration: none;
}

.btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
}

.btn-icon:hover {
    background: #f8f9fa;
    color: #333;
}

/* Error Message */
.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.error-message i {
    font-size: 14px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    font-size: 12px;
}

/* JSON Syntax Highlighting */
.json-key { color: #0066cc; font-weight: 600; }
.json-string { color: #008800; }
.json-number { color: #cc6600; }
.json-boolean { color: #cc0066; font-weight: 600; }
.json-null { color: #999999; font-style: italic; }

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .left-panel,
    .right-panel {
        max-width: none;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .input-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }
    
    .input-section,
    .decoded-section {
        padding: 15px;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .jwt-input {
        min-height: 150px;
    }
}

@media (max-width: 820px) {
    .main-content {
        max-width: 100vw;
        padding: 8px;
    }
    .content-wrapper {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .left-panel,
    .right-panel,
    .decoded-section,
    .section-content,
    .jwt-input {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        margin: 0;
    }
    .decoded-section {
        margin: 12px 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 

.signature-verification-section {
    margin-top: 0;
    background: none;
    border-radius: 0;
    padding: 0;
    color: inherit;
}
.sigver-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}
.sigver-optional {
    color: #aaa;
    font-weight: 400;
    font-size: 12px;
}
.sigver-desc {
    font-size: 13px;
    color: #ccc;
    margin: 6px 0 10px 0;
}
.sigver-box {
    background: #fafbfc;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 20px;
    margin-top: 16px;
}
.sigver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #181a20;
    border-bottom: 1px solid #333;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    border-radius: 6px 6px 0 0;
}
.sigver-actions {
    display: flex;
    gap: 6px;
}
.btn-xs {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 3px;
}
.sigver-input {
    width: 100%;
    background: #fafbfc;
    color: #333;
    border: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    padding: 0;
    margin: 0;
    outline: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}
.sigver-input::placeholder {
    color: #bbb;
}
.sigver-input:focus {
    background: #fff;
}
.sigver-banner {
    margin: 0 0 8px 0;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #333;
    border: 1px solid #e1e5e9;
}
.sigver-banner.sigver-success {
    background: #e6f9ed;
    color: #1e7e34;
    border: 1px solid #43d675;
}
.sigver-banner.sigver-fail {
    background: #fbeaea;
    color: #b33a3a;
    border: 1px solid #b33a3a;
} 

.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fullscreen-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 32px 32px 24px 32px;
    max-width: 900px;
    width: 90vw;
    max-height: 90vh;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.fullscreen-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    z-index: 10;
}
#fullscreen-modal-data {
    width: 100%;
    min-height: 300px;
    max-height: 70vh;
    overflow: auto;
    margin-top: 24px;
    font-size: 16px;
    background: #fafbfc;
    color: #222;
} 

.main-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    padding: 0;
    margin: 0;
}
.main-nav .nav-item {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.main-nav .nav-item.active,
.main-nav .nav-item:hover {
    background: #f0f0f0;
    color: #222;
} 