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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header Section */
.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.domain-name {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background-color: #f0f2f5;
    color: #666;
}

.btn-secondary:hover {
    background-color: #e4e6eb;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-link {
    background: none;
    color: #3b82f6;
    padding: 4px 8px;
}

.btn-link:hover {
    color: #2563eb;
    background-color: #f0f9ff;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.btn-icon:hover {
    color: #333;
    background-color: #f0f2f5;
    border-radius: 4px;
}

.btn-delete {
    color: #ef4444;
}

.btn-delete:hover {
    color: #dc2626;
    background-color: #fee2e2;
}

/* Info Bar */
.info-bar {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-group {
    display: flex;
    gap: 40px;
    margin-bottom: 15px;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

/* Web Server Configuration */
.webserver-config {
    margin-bottom: 30px;
}

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

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.section-actions {
    display: flex;
    gap: 10px;
}

.config-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.config-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.card-icon {
    margin-bottom: 15px;
    color: #666;
}

.config-card h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.card-status {
    font-size: 14px;
    color: #666;
    padding: 6px 12px;
    background-color: #f0f2f5;
    border-radius: 20px;
    display: inline-block;
}

.status-error {
    background-color: #fee2e2;
    color: #dc2626;
}

.status-success {
    background-color: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cancel-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Subdomains Section */
.subdomains-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.subdomains-table {
    width: 100%;
    border-collapse: collapse;
}

.subdomains-table thead {
    background-color: #f8f9fa;
}

.subdomains-table th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.subdomains-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.subdomains-table tbody tr:hover {
    background-color: #f8f9fa;
}

.subdomain-info {
    display: flex;
    flex-direction: column;
}

.subdomain-name {
    font-weight: 600;
    color: #059669;
}

.domain-suffix {
    color: #333;
}

.subdomain-path {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.quick-links {
    display: flex;
    gap: 8px;
}

.disk-usage {
    min-width: 200px;
}

.progress {
    height: 20px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.usage-text {
    font-size: 12px;
    color: #666;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-php {
    background-color: #e0e7ff;
    color: #4338ca;
}

.info-icon {
    vertical-align: middle;
    margin-left: 4px;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #666;
}

.items-per-page {
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background-color: white;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .domain-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .domain-name {
        font-size: 24px;
    }

    .info-group {
        flex-direction: column;
        gap: 15px;
    }

    .config-cards {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-actions {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }

    .section-actions .btn-link {
        justify-content: flex-start;
    }

    .subdomains-table {
        font-size: 14px;
    }

    .subdomains-table th,
    .subdomains-table td {
        padding: 10px 8px;
    }

    .quick-links {
        flex-direction: column;
        gap: 4px;
    }

    .table-actions {
        flex-direction: column;
        gap: 4px;
    }

    .disk-usage {
        min-width: 150px;
    }

    /* Hide some columns on mobile */
    .subdomains-table th:nth-child(2),
    .subdomains-table td:nth-child(2) {
        display: none;
    }
}

@media (max-width: 480px) {
    .domain-name {
        font-size: 20px;
    }

    .btn {
        font-size: 13px;
        padding: 6px 12px;
    }

    .subdomains-table {
        font-size: 13px;
    }

    /* Stack table cells on very small screens */
    .subdomains-table thead {
        display: none;
    }

    .subdomains-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
    }

    .subdomains-table td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
    }

    .subdomains-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}