/* MD5 Hash Generator Tool Styles */
:root {
    --md5-primary: #10b981;
    --md5-primary-dark: #059669;
    --md5-secondary: #6b7280;
    --md5-secondary-dark: #4b5563;
    --md5-background: #f8fafc;
    --md5-card: #ffffff;
    --md5-border: #e2e8f0;
    --md5-text: #374151;
    --md5-text-light: #6b7280;
    --md5-success: #d1fae5;
    --md5-success-text: #065f46;
    --md5-error: #fee2e2;
    --md5-error-text: #991b1b;
    --md5-warning: #fef3c7;
    --md5-warning-text: #92400e;
}

/* Container styles */
.md5-generator-container {
    background: linear-gradient(135deg, var(--md5-background) 0%, #ffffff 100%);
    min-height: calc(100vh - 120px);
    padding: 0;
    margin: 0;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Tool sections */
.tool-section {
    background: var(--md5-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tool-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Input and Output sections */
.input-section, .output-section {
    margin-bottom: 1.5rem;
}

.input-label, .output-label {
    display: block;
    font-weight: 600;
    color: var(--md5-text);
    margin-bottom: 0.5rem;
    font-size: 16px;
}

.input-area {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid var(--md5-border);
    border-radius: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.input-area:focus {
    outline: none;
    border-color: var(--md5-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: white;
}

.input-area::placeholder {
    color: var(--md5-text-light);
}

/* Character counter */
.character-counter {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 14px;
    color: var(--md5-text-light);
}

/* Hash output container */
.hash-output-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.hash-output {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--md5-border);
    border-radius: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    background: var(--md5-background);
    color: var(--md5-text);
    font-weight: 600;
}

.hash-output:focus {
    outline: none;
    border-color: var(--md5-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Copy button */
.copy-btn {
    background: linear-gradient(135deg, var(--md5-primary) 0%, var(--md5-primary-dark) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
    position: relative;
}

.copy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--md5-primary-dark) 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.copy-btn:disabled {
    background: linear-gradient(135deg, var(--md5-secondary) 0%, var(--md5-secondary-dark) 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.copy-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Copy button states */
.copy-btn.copying {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    pointer-events: none;
}

.copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    pointer-events: none;
}

.copy-btn .copy-icon {
    transition: all 0.3s ease;
}

.copy-btn.copying .copy-icon,
.copy-btn.copied .copy-icon {
    transform: scale(1.1);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-btn {
    background: linear-gradient(135deg, var(--md5-secondary) 0%, var(--md5-secondary-dark) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--md5-secondary-dark) 0%, #374151 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* Generate button - make it more prominent */
.generate-btn {
    background: linear-gradient(135deg, var(--md5-primary) 0%, var(--md5-primary-dark) 100%);
}

.generate-btn:hover {
    background: linear-gradient(135deg, var(--md5-primary-dark) 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Hash information grid */
.hash-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-icon {
    font-size: 1.5rem;
    color: var(--md5-primary);
    min-width: 24px;
}

.info-content {
    flex: 1;
}

.info-title {
    font-weight: 600;
    color: var(--md5-text);
    margin-bottom: 0.25rem;
    font-size: 14px;
}

.info-text {
    color: var(--md5-text-light);
    font-size: 13px;
}

/* Other hashes section */
.other-hashes-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--md5-border);
}

.other-hashes-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--md5-text);
    margin-bottom: 0.5rem;
}

.other-hashes-description {
    color: var(--md5-text-light);
    margin-bottom: 1rem;
    font-size: 14px;
}

.other-hashes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hash-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    align-items: center;
}

.hash-label {
    font-weight: 600;
    color: var(--md5-text);
    font-size: 14px;
}

.hash-value-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.hash-value {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--md5-border);
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: var(--md5-background);
    color: var(--md5-text);
}

.mini-copy-btn {
    background: var(--md5-primary);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    position: relative;
}

.mini-copy-btn:hover {
    background: var(--md5-primary-dark);
    transform: translateY(-1px);
}

/* Mini copy button states */
.mini-copy-btn.copying {
    background: #f59e0b;
    pointer-events: none;
}

.mini-copy-btn.copied {
    background: #10b981;
    pointer-events: none;
}

.mini-copy-btn .copy-icon {
    transition: all 0.3s ease;
}

.mini-copy-btn.copying .copy-icon,
.mini-copy-btn.copied .copy-icon {
    transform: scale(1.2);
}

/* Messages */
.success-message {
    background: var(--md5-success);
    color: var(--md5-success-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: var(--md5-error);
    color: var(--md5-error-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

/* Hash box loading states */
.hash-output.generating,
.hash-value.generating {
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: var(--md5-primary);
    font-style: italic;
    font-weight: 500;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Results animation */
.results-container {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.results-container.show {
    opacity: 1;
    transform: translateY(0);
}

/* API status indicator */
.api-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: var(--md5-text-light);
    margin-left: 0.5rem;
}

.api-status.online {
    color: var(--md5-primary);
}

.api-status.offline {
    color: var(--md5-error-text);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Title gradient */
.title-gradient {
    color: #000000;
}

/* Hidden file input */
.hidden-input {
    display: none;
}

/* Related Tools Section */
.related-tools-section {
    background: var(--md5-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--md5-text);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: var(--md5-primary);
}

.related-tools-header p {
    color: var(--md5-text-light);
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--md5-primary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--md5-border);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: linear-gradient(135deg, var(--md5-primary) 0%, var(--md5-primary-dark) 100%);
    color: white;
    border-color: var(--md5-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .tool-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .hash-output-container {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hash-info-grid {
        grid-template-columns: 1fr;
    }
    
    .hash-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .hash-label {
        margin-bottom: 0.25rem;
    }

    .related-tools-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 4px;
    }

    .related-tool-link i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .tool-section {
        padding: 0.75rem;
    }
    
    .input-area {
        padding: 1rem;
        font-size: 13px;
        min-height: 150px;
    }
    
    .hash-output {
        padding: 0.75rem 1rem;
        font-size: 12px;
    }
    
    .copy-btn {
        padding: 0.75rem 1rem;
        font-size: 13px;
    }

    .related-tools-section {
        padding: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tool-link {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
        text-align: left;
    }
}
