/* Scoped styles for the Hash Generator App */

:root {
    --hg-bg: rgba(17, 24, 39, 0.7);
    --hg-primary: #06b6d4;
    --hg-primary-hover: #0891b2;
    --hg-border: rgba(255, 255, 255, 0.1);
}

.app-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-card {
    background: var(--hg-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--hg-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    width: 100%;
    max-width: 950px;
    overflow: hidden;
    min-height: 520px;
    margin-top: 2rem;
}

/* Common Section Styles */
.input-section,
.display-section {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Left Section */
.input-section {
    border-right: 1px solid var(--hg-border);
}

.brand {
    margin-bottom: 1.5rem;
}

.brand h1 {
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(to right, #22d3ee, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand p {
    color: #94a3b8;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group > label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Textarea */
textarea#text-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--hg-border);
    border-radius: 12px;
    padding: 1rem;
    color: #f8fafc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    transition: all 0.3s ease;
    min-height: 100px;
}

textarea#text-input:focus {
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

/* Algorithm Buttons */
.algo-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.algo-btn {
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--hg-border);
    background: rgba(15, 23, 42, 0.6);
    color: #64748b;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.algo-btn:hover {
    border-color: var(--hg-primary);
    color: var(--hg-primary);
}

.algo-btn.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--hg-primary);
    color: var(--hg-primary);
}

/* Checkbox */
.checkbox-group {
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--hg-primary);
    border-color: var(--hg-primary);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

/* Generate Button */
#generate-btn {
    background: linear-gradient(135deg, var(--hg-primary), var(--hg-primary-hover));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#generate-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

#generate-btn:active {
    transform: translateY(0);
}

/* Right Section */
.display-section {
    align-items: center;
    background: rgba(15, 23, 42, 0.3);
    position: relative;
    overflow-y: auto;
}

.placeholder {
    text-align: center;
    color: #94a3b8;
}

#result-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-header {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.result-header label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hash List */
.hash-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow-y: auto;
}

.hash-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--hg-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.hash-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.hash-algo-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-primary);
}

.hash-bits {
    font-size: 0.7rem;
    color: #475569;
}

.hash-value-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hash-value {
    flex: 1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #f8fafc;
    word-break: break-all;
    line-height: 1.5;
}

.copy-hash-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: color 0.2s ease;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.copy-hash-btn:hover {
    color: var(--hg-primary);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        height: auto;
    }

    .input-section {
        border-right: none;
        border-bottom: 1px solid var(--hg-border);
        padding: 2rem;
    }

    .display-section {
        padding: 2rem;
        min-height: 300px;
    }

    .brand h1 {
        font-size: 1.8rem;
    }
}
