body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent),
        radial-gradient(1px 1px at 150px 150px, white, transparent),
        radial-gradient(1px 1px at 200px 100px, white, transparent),
        radial-gradient(2px 2px at 170px 50px, white, transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

.wrapper, .table-container {
    position: relative;
    z-index: 1;
}

.wrapper {
    display: flex;
    gap: 30px;
    margin: 20px auto;
    max-width: 1400px;
    min-height: 55vh;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.container {
    width: 350px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.output-container {
    flex-grow: 1;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.step, .hidden {
    display: none;
}

.step:first-child {
    display: block;
}

label {
    display: block;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #495057;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px;
    margin: 5px 0 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select2-selection {
    width: 100%;
    margin-bottom: 15px;
}

button {
    width: 100%;
    cursor: pointer;
    border: none;
    padding: 14px;
    margin: 8px 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
}

#generate { background: #28a745; color: white; }
#generate:hover { background: #218838; }

#edit { background: #007bff; color: white; }
#edit:hover { background: #0056b3; }

#reset { background: #dc3545; color: white; }
#reset:hover { background: #c82333; }

#downloadQrPng, #downloadQrSvg, #qrOptionsToggle {
    background: #6c757d;
    color: white;
}
#downloadQrPng:hover, #downloadQrSvg:hover, #qrOptionsToggle:hover {
    background: #5a6268;
}

.copy-icon {
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
    color: #007bff;
}

.copy-icon:hover {
    color: #0056b3;
}

.copy-icon-green {
    color: #28a745;
}

.copy-icon-green:hover {
    color: #1e7e34;
}

.output-container p {
    font-size: 15px;
    color: #495057;
    margin: 20px 0;
    font-weight: 500;
}

.output-code, .output-code-table {
    background-color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    border: 2px solid #e0e0e0;
    display: inline-block;
    word-break: break-all;
    max-width: 100%;
    font-size: 14px;
}

.output-code-table {
    max-width: 90% !important;
}

#downloadQrPng, #downloadQrSvg, #qrOptionsToggle {
    width: 100%;
    max-width: 512px;
    display: block;
}

#qrOptionsContainer {
    width: 100%;
    max-width: 512px;
}

.table-container {
    margin: 40px auto;
    max-width: 1400px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.table-container h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

#linksTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#linksTable th, #linksTable td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

#linksTable th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

#linksTable tbody tr {
    transition: background-color 0.2s ease;
}

#linksTable tbody tr:hover {
    background-color: #f8f9fa;
}

.dataTables_filter {
    margin: -60px 0 20px;
}

.action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.edit-link, .delete-link, .duplicate-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: white;
}

.edit-link { background-color: #fd7e14; }
.edit-link:hover { background-color: #e0660f; }

.edit-link:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}
.edit-link:disabled:hover {
    background-color: #adb5bd;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.delete-link { background-color: #dc3545; }
.delete-link:hover { background-color: #c82333; }

.duplicate-link { background-color: #28A745; }
.duplicate-link:hover { background-color: #1C7A2B; }



.suggestions {
    margin-top: -5px;
    margin-bottom: 15px;
}

.suggestions a {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#qrcode {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 40px 0;
}
