/* Calculator Page Styles */

/* Layout */
.calculator-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

/* Header and Navigation */
.back-btn {
    background-color: transparent;
    color: #0066cc;
    border: none;
    box-shadow: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: auto;
    width: auto;
    min-width: 0;
    margin-bottom: 20px;
}

.back-btn:hover {
    background-color: #f0f0f0;
    color: #0066cc;
    text-decoration: none;
}

.back-arrow {
    margin-right: 4px;
    font-size: 18px;
    line-height: 1;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Buttons */
.buttons-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

button {
    background-color: #0066cc;
    color: white;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 42px;
    width: 200px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #0055aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.telegram-btn {
    background-color: #0088cc;
    color: white;
    padding: 0;
    border-radius: 4px;
    border: 1px solid #0077b5;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    width: 200px;
    min-width: 200px;
}

.telegram-btn:hover {
    background-color: #0077b5;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.telegram-btn img {
    margin-right: 8px;
}

/* Results Table */
.results {
    margin-top: 20px;
    display: none;
}

.table-container {
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #ddd;
    color: #202124;
    font-weight: 500;
    padding: 8px 12px;
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    color: #202124;
}

tr:hover {
    background-color: #f8f9fa;
}

.hash-cell {
    font-family: 'Roboto Mono', monospace;
    color: #1a73e8;
    cursor: pointer;
}

.number-cell {
    text-align: right;
}

.energy-price-column {
    background-color: #e1f0ff;
    font-weight: 600;
}

/* Info Boxes */
.price-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #e1f0ff;
    border-radius: 4px;
    border-left: 4px solid #0066cc;
    font-size: 14px;
    line-height: 1.5;
}

.price-info a {
    color: #0066cc;
    font-weight: 600;
    text-decoration: none;
}

.error {
    color: #d32f2f;
    font-weight: 500;
    margin: 1rem 0;
}

.total-savings-display {
    display: none;
    background-color: #e1f0ff;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 600;
    color: #0066cc;
    font-size: 16px;
    border-left: 4px solid #0066cc;
    margin-left: auto;
}

.total-savings-display.visible {
    display: block;
}

/* VIP Message */
.vip-message {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background-color: #fdf7e3;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    color: #8B6C15;
}

.vip-message a {
    color: #0066cc;
    font-weight: 600;
    text-decoration: none;
}

.vip-message a:hover {
    text-decoration: underline;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #1a73e8;
    animation: spin 1s linear infinite;
}

.resource-loading {
    opacity: 0.5;
}

.loading-cell {
    text-align: center;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-text {
    margin-left: 10px;
    color: #1a73e8;
    font-size: 14px;
}

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

/* Fireworks Canvas */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    display: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .from-column,
    .from-cell {
        display: none;
    }
    
    .buttons-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    button,
    .telegram-btn {
        width: 100%;
    }
    
    .total-savings-display {
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
    
    th, td {
        padding: 8px 6px;
        font-size: 12px;
    }
} 