/* Satodime Flask Application Styles */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* Vaults Grid */
.vaults-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.vault-card {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    overflow: hidden;
}

.vault-card.sealed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.vault-card.unsealed {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.vault-card.uninitialized {
    background: linear-gradient(135deg, #D3D3D3 0%, #808080 100%);
}

.vault-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.vault-number {
    font-size: 2rem;
    font-weight: 700;
}

.vault-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.lock-icon {
    width: 16px;
    height: 16px;
}

.vault-address {
    font-family: monospace;
    font-size: 1rem;
    margin: 1rem 0;
    opacity: 0.9;
    word-break: break-all;
}

.vault-balance {
    display: flex;
    justify-content: space-between;
    /*align-items: flex-end;*/
    /*align-items: stretch;*/
    align-items: center;
    /*margin-top: 2rem;*/
}

.coin-logo {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.balance-info {
    text-align: right;
}

.total-balance {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.crypto-amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.fiat-value {
    font-size: 0.9rem;
    opacity: 0.9;
}

.token-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: rgba(99, 102, 241, 0.9);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* token */
.token-card {
    position: relative;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: all 0.3s ease;
    /*color: white;*/
    /*overflow: hidden;*/
}

.token-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.token-card-header {
    border-radius: 10px 10px 0 0;
    border-bottom: none;
    padding: 1rem;
}

.token-balance {
    display: flex;
    justify-content: space-between;
    /*align-items: flex-end;*/
    /*align-items: stretch;*/
    align-items: center;
    /*margin-top: 2rem;*/
}

/*
.token-card-body {
    padding: 1rem;
}

.token-card-text {
    padding: 1rem;
}
*/

/* Decorative Pattern TODO remove */
.vault-pattern {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 Q80 40 50 70 Q20 40 50 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') center/contain no-repeat;
    opacity: 0.3;
}

/* Card Styling */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.sig-card {
    position: relative;
    padding: 0.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    color: white;
    overflow: hidden;
}

.sig-card.authentic {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sig-card.notauthentic {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.monospace-wrap {
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 0.9em;
}

.sig-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    /*border-radius: 10px 10px 0 0;*/
    border-radius: 16px;
    border-bottom: none;
    padding: 0.5rem;
}

/* Balance Styling */
.balance-positive {
    color: var(--success-color);
    font-weight: 600;
    font-family: monospace;
}

.balance-zero {
    color: var(--dark-color);
    opacity: 0.7;
    font-family: monospace;
}

/* Signature Status */
.signature-valid {
    color: var(--success-color);
    font-weight: 600;
}

.signature-invalid {
    color: var(--danger-color);
    font-weight: 600;
}

/* center image*/
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center; /* Also centers vertically */
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background-color: #e7f3ff;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    margin-top: 4rem;
}

.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #e2e8f0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.2s;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Modals */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Code Blocks */
pre {
    background-color: var(--light-color);
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    font-size: 0.875rem;
    overflow-x: auto;
}

code {
    background-color: var(--light-color);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

/* List Groups */
.list-group-item {
    border-color: #dee2e6;
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: var(--light-color);
}

/* Hero Section */
.jumbotron {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    .d-md-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-top {
        padding: 2rem 1rem;
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* Utility Classes */
.text-monospace {
    font-family: monospace;
}

.border-gradient {
    background: var(--primary-gradient);
    border: none;
    background-clip: padding-box;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}