/* ==========================================================================
   SHARED TOOL STYLES - Bitcoin Data Labs
   Unified design system for all tools with inspiration from plebdashboard-ln
   ========================================================================== */

/* ==========================================================================
   TOOLS INDEX PAGE STYLES
   ========================================================================== */

.tools-hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    margin-bottom: 3rem;
    border-radius: 12px;
}

.tools-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.tools-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid #ececec;
    box-shadow: 0 2px 8px rgba(42, 51, 66, 0.07);
    transition: transform 0.18s, box-shadow 0.18s, background 0.25s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 18px rgba(232, 145, 107, 0.12);
    background: linear-gradient(120deg, var(--bg-primary) 70%, var(--accent-warm) 100%);
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary);
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.tool-card:hover h3 {
    color: var(--primary);
}

.tool-card h3 i {
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tool-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 300;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tool-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    padding: 0.18rem 0.6rem;
    border-radius: 16px;
    font-weight: 500;
    box-shadow: 0 1px 6px rgba(232, 145, 107, 0.08);
    border: 1px solid var(--accent-warm);
    background-color: var(--accent-warm);
    color: var(--text-primary);
    opacity: 0.95;
    white-space: nowrap;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, var(--primary), var(--accent-cool)) 1;
    display: flex;
    align-items: center;
    opacity: 0.95;
    letter-spacing: 0.02em;
}

.section-title i {
    color: var(--primary);
    margin-right: 0.5rem;
}

section {
    margin-bottom: 4rem;
}

/* ==========================================================================
   INDIVIDUAL TOOL PAGE STYLES
   ========================================================================== */

/* Page content wrapper */
.tool-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Tool header section */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-header h1 i {
    color: var(--primary);
    font-size: 1.8rem;
}

.tool-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Instructions box - inspired by plebdashboard-ln cards */
.instructions-box {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border, #ececec);
    box-shadow: 0 2px 8px rgba(42, 51, 66, 0.08);
}

.instructions-box h3 {
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.instructions-box h3 i {
    color: var(--primary);
}

.instructions-box ol,
.instructions-box ul {
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Content sections */
.content-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(42, 51, 66, 0.08);
    border: 1px solid #ececec;
    transition: all 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 4px 12px rgba(42, 51, 66, 0.12);
}

.content-section h2 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-section h2 i {
    color: var(--primary);
}

/* ==========================================================================
   FORM ELEMENTS (Inspired by plebdashboard-ln)
   ========================================================================== */

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--bg-secondary);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 145, 107, 0.1);
}

label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Select dropdown styling */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ==========================================================================
   BUTTONS (From plebdashboard-ln components)
   ========================================================================== */

button,
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(232, 145, 107, 0.3);
    position: relative;
    overflow: hidden;
}

button:hover,
.btn:hover {
    background-color: #d67e54;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 145, 107, 0.4);
}

button:active,
.btn:active {
    transform: translateY(0);
}

/* Shine effect on hover */
button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button:hover::before,
.btn:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border, #ececec);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================================================
   TABLES (Enhanced from original)
   ========================================================================== */

.table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(42, 51, 66, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

th {
    background-color: var(--secondary);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bg-secondary);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: rgba(232, 145, 107, 0.05);
}

/* ==========================================================================
   LOADING STATES (From plebdashboard-ln)
   ========================================================================== */

.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.loading i {
    font-size: 2rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    padding: 1rem;
}

/* ==========================================================================
   BADGES & LABELS (From plebdashboard-ln)
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ==========================================================================
   CARDS (From plebdashboard-ln)
   ========================================================================== */

.card {
    background: var(--bg-primary);
    border: 1px solid var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(42, 51, 66, 0.08);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(232, 145, 107, 0.12);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.card-header i {
    color: var(--primary);
}

.card-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    /* Tools index page */
    .tools-hero {
        padding: 2rem 1rem;
        border-radius: 10px;
    }
    
    .tools-hero h1 {
        font-size: 2rem;
    }
    
    .tools-hero p {
        font-size: 1.1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tools-container {
        padding: 0 1rem 3rem;
    }
    
    .tool-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    /* Individual tool pages */
    .tool-content {
        padding: 1rem 0.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.5rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
    
    .content-section {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    .instructions-box {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    /* Tables */
    .table-wrapper {
        border-radius: 6px;
    }
    
    th, td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Buttons */
    button, .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    section {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .tools-hero h1 {
        font-size: 1.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.3rem;
        flex-direction: column;
    }
    
    .tool-card h3 {
        font-size: 1rem;
    }
}
