/* Modern CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container { 
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header Hero Section */
.domain-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    margin: 20px 0 40px 0;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.domain-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.domain-info h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.domain-info p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* Category Headers */
.category-header {
    text-align: center;
    margin: 50px 0 30px 0;
    padding: 30px 20px;
    border-radius: 15px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-header h2 {
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* Test Sections */
.test-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.test-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modern Button Styling */
.button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    margin: 8px;
    text-decoration: none;
    border-radius: 10px;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    vertical-align: top;
    line-height: 1.4;
    text-align: center;
    min-height: 44px;
    box-sizing: border-box;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.button:hover::before {
    left: 100%;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* Specific Button Colors */
.transfer-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.transfer-button:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Result & Info Boxes */
.result, #cookies {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    margin: 25px 0;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c3e50;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
}

/* File Upload Section */
#file-upload-section {
    display: none;
    margin: 25px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px dashed #667eea;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

#file-upload-section:hover {
    border-color: #764ba2;
    background: rgba(255, 255, 255, 1);
}

#file-upload-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

#fileInput {
    margin: 15px 0;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#fileInput:focus {
    outline: none;
    border-color: #667eea;
}

/* Action Buttons */
.action-buttons {
    text-align: center;
    margin: 40px 0;
}

.action-buttons .button {
    font-size: 1.1rem;
    padding: 18px 36px;
    margin: 10px 15px;
    border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .domain-info {
        padding: 40px 20px;
    }
    
    .domain-info h1 {
        font-size: 2.5rem;
    }
    
    .test-section {
        padding: 20px;
    }
    
    .button {
        display: block;
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    
    .action-buttons .button {
        display: block;
        margin: 15px 0;
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

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

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.02); 
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Enhanced result styling */
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.result-header .success {
    color: #27ae60;
    font-weight: 600;
}

.result-header .error {
    color: #e74c3c;
    font-weight: 600;
}

.result-details {
    margin-top: 15px;
    padding: 15px;
    background: rgba(44, 62, 80, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(44, 62, 80, 0.15);
    color: #2c3e50;
}

.result-details pre {
    white-space: pre-wrap;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
    color: #34495e;
}

/* Loading animations */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced hover effects */
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.button:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Test section enhancements */
.test-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Enhanced notifications */
.notification {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.notification-close:hover {
    color: #2c3e50 !important;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
}

/* Enhanced category headers */
.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.1;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .domain-info h1 {
        font-size: 3rem;
    }
    
    .button {
        padding: 14px 22px;
        font-size: 0.95rem;
        min-height: 48px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent zoom on iOS */
        -webkit-text-size-adjust: 100%;
    }
    
    .container {
        padding: 10px;
        margin: 5px;
        width: calc(100% - 10px);
    }
    
    .domain-info {
        padding: 20px 15px;
        text-align: center;
    }
    
    .domain-info h1 {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }
    
    .domain-info p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .test-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .category-header {
        padding: 12px 15px;
        margin: 15px 0 10px 0;
    }
    
    .category-header h2 {
        font-size: 1.3rem;
    }
    
    .button {
        display: block;
        width: calc(100% - 16px);
        margin: 8px 8px;
        padding: 16px 20px;
        font-size: 1rem;
        border-radius: 12px;
        min-height: 52px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .result, #cookies {
        padding: 15px;
        margin: 15px 0;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .result-header {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .result-details {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
        margin: 0;
        width: 100%;
        border-radius: 0;
    }
    
    .domain-info {
        padding: 15px 10px;
        border-radius: 0 0 15px 15px;
    }
    
    .domain-info h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .domain-info p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .test-section {
        padding: 12px;
        border-radius: 10px;
        margin: 10px 0;
    }
    
    .category-header {
        padding: 10px 12px;
        border-radius: 8px;
        margin: 10px 0 8px 0;
    }
    
    .category-header h2 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .button {
        padding: 18px 16px;
        font-size: 0.95rem;
        margin: 6px 0;
        width: 100%;
        min-height: 56px;
        border-radius: 10px;
    }
    
    .result, #cookies {
        padding: 12px;
        font-size: 0.85rem;
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .result-header {
        font-size: 1rem;
    }
    
    .result-details {
        font-size: 0.8rem;
    }
    
    /* Improved touch targets and interactions */
    .button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Better text wrapping for mobile */
    .result-details pre {
        white-space: pre-wrap;
        word-break: break-word;
        font-size: 0.75rem;
    }
}

/* Enhanced focus states for accessibility */
.button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

#fileInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .result, .test-section {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }
    
    .result-details {
        background: rgba(52, 73, 94, 0.3);
        color: #bdc3c7;
    }
    
    .result-details pre {
        color: #ecf0f1;
    }
    
    .test-section h3 {
        color: #ecf0f1;
    }
}
/* Formatted result styles */
.formatted-result {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.result-item {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .key {
    font-weight: 600;
    color: #3498db;
    min-width: 140px;
    margin-right: 15px;
    font-size: 0.9rem;
}

.result-item .value {
    color: #ecf0f1;
    font-size: 0.9rem;
    flex: 1;
}

.result-item .value.success {
    color: #27ae60;
    font-weight: 600;
}

.result-item .value.error {
    color: #e74c3c;
    font-weight: 600;
}

.result-item .value.highlight {
    color: #f39c12;
    font-weight: 600;
    background: rgba(243, 156, 18, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.array-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.array-item {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.result-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.section-title {
    color: #3498db;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-content {
    margin-left: 10px;
}
