/* Shared styles for enne.tech utilities */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation */
nav {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.2);
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

/* Cards */
.main-card, .info-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    margin-bottom: 30px;
}

/* Utility Grid (for index page) */
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.utility-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.utility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.utility-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
    font-weight: bold;
}

.utility-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.utility-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Form elements */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    font-size: 1rem;
}

textarea, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Courier New', monospace;
}

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

textarea:focus, input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn.copied {
    background: #28a745;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Output areas */
.output-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    word-break: break-all;
    min-height: 60px;
    display: flex;
    align-items: center;
    color: #495057;
}

.output-box.empty {
    color: #adb5bd;
    font-style: italic;
}

/* Privacy notice */
.privacy-notice {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #1565c0;
}

.privacy-notice strong {
    display: block;
    margin-bottom: 5px;
}

/* Info sections */
.info-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-section p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.feature h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: white;
    opacity: 0.8;
}

/* Utility-specific layouts */
.input-section {
    margin-bottom: 30px;
}

.hash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .hash-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hash-result {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e9ecef;
}

.hash-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hash-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

/* Button groups */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* CIDR specific */
.cidr-result {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.cidr-result h3 {
    margin-bottom: 15px;
    color: #333;
}

.cidr-info {
    display: grid;
    gap: 10px;
}

.cidr-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.cidr-row label {
    font-weight: 600;
    color: #555;
    margin: 0;
}

.cidr-row span {
    font-family: 'Courier New', monospace;
    color: #333;
}

/* Error states */
.error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* SVG icons */
.icon {
    width: 16px;
    height: 16px;
}
