/* Network Tools CSS */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #0a0a0a, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
.header {
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 45px;
  width: auto;
  filter: brightness(1.2);
  transition: all 0.3s ease;
}

.logo-img:hover {
  filter: brightness(1.4) drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
}

.back-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00f5ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.back-link:hover {
    color: #fff;
    background: rgba(0, 245, 255, 0.1);
    transform: translateX(-5px);
}

/* Main Section */
.tools-section {
    padding: 60px 0;
    position: relative;
}

.tools-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.tools-header {
    text-align: center;
    margin-bottom: 80px;
}

.tools-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00f5ff, #ff0080);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.tools-header p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #ccc;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.tools-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #00f5ff;
    display: block;
}

.stat-label {
    color: #aaa;
    font-size: 0.9rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* Tool Card */
.tool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: #00f5ff;
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.2);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, rgba(0, 245, 255, 0.2), rgba(0, 128, 255, 0.1));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #00f5ff;
}

.tool-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.tool-info p {
    color: #aaa;
    font-size: 0.9rem;
}

.tool-content {
    margin-bottom: 25px;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 45px;
}

.form-input:focus {
    outline: none;
    border-color: #00f5ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.form-input::placeholder {
    color: #666;
}

.form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 12px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #00f5ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.form-select option {
    background: #1a1a1a;
    color: white;
}

.tool-btn {
    background: linear-gradient(45deg, #00f5ff, #0080ff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 245, 255, 0.3);
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tool-result {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.tool-result.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-title {
    color: #00f5ff;
    font-weight: 600;
    font-size: 1rem;
}

.copy-result-btn {
    background: rgba(0, 245, 255, 0.2);
    border: 1px solid rgba(0, 245, 255, 0.4);
    color: #00f5ff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-result-btn:hover {
    background: rgba(0, 245, 255, 0.3);
}

.result-content {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #00f5ff;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.4;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00f5ff;
    cursor: pointer;
}

.checkbox-item label {
    font-size: 0.9rem;
    color: #ccc;
    cursor: pointer;
}

.range-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.range-input {
    flex: 1;
    accent-color: #00f5ff;
    cursor: pointer;
}

.range-value {
    background: rgba(0, 245, 255, 0.2);
    color: #00f5ff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.tool-description {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Password Generator - Hidden element for copying */
.password-only {
    display: none !important;
}

/* QR Code Specific Styles */
.qr-display {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.qr-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: white;
    padding: 10px;
}

.qr-text {
    color: #00f5ff;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}

.qr-info {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 245, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00f5ff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom scrollbar for result content */
.result-content::-webkit-scrollbar {
    width: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 255, 0.5);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 255, 0.7);
}

/* Textarea specific styles */
textarea.form-input {
    min-height: 80px;
    font-family: inherit;
}

/* Enhanced button styles for new tools */
.copy-result-btn[onclick*="copyPasswordOnly"] {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.4);
    color: #28a745;
}

.copy-result-btn[onclick*="copyPasswordOnly"]:hover {
    background: rgba(40, 167, 69, 0.3);
}

.copy-result-btn[onclick*="downloadQR"] {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

.copy-result-btn[onclick*="downloadQR"]:hover {
    background: rgba(255, 193, 7, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 25px 20px;
    }
    
    .tools-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .result-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .qr-image {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .tools-container {
        padding: 0 15px;
    }
    
    .tool-card {
        padding: 20px 15px;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .qr-image {
        max-width: 250px;
    }
    
    .range-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .range-value {
        align-self: center;
    }
}