/* ===================================
   DNS GENERATOR - MODERN & ACCESSIBLE
   =================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* ===================================
   FOCUS STATES - KRITIČNO ZA ACCESSIBILITY
   =================================== */

/* Ukloni default outline */
*:focus {
    outline: none;
}

/* SUPER VIDLJIV focus indicator za keyboard navigaciju */
*:focus-visible,
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 5px solid #ffeb3b !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px rgba(255, 235, 59, 0.4), 0 0 20px rgba(255, 235, 59, 0.6) !important;
    position: relative;
    z-index: 100;
    animation: pulse-focus 2s infinite;
}

/* Animacija fokusa za još bolju vidljivost */
@keyframes pulse-focus {
    0%, 100% {
        box-shadow: 0 0 0 8px rgba(255, 235, 59, 0.4), 0 0 20px rgba(255, 235, 59, 0.6);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 235, 59, 0.6), 0 0 30px rgba(255, 235, 59, 0.8);
    }
}

/* ===================================
   LAYOUT
   =================================== */

.page-container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.page-header {
    background: linear-gradient(135deg, #0078d7 0%, #005a9e 100%);
    padding: 40px;
    text-align: center;
    color: white;
    position: relative;
}

.header-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

.main-content {
    padding: 50px;
}

/* ===================================
   FORM STYLING
   =================================== */

.dns-form {
    margin-bottom: 50px;
}

.form-section {
    margin-bottom: 35px;
}

.form-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.label-text {
    margin-right: 5px;
}

.label-required {
    color: #e74c3c;
    font-size: 1.3rem;
}

/* INPUT FIELD */
.form-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.1rem;
    border: 3px solid #cbd5e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

.form-input:hover {
    border-color: #0078d7;
    background: white;
}

.form-input:focus {
    border-color: #0078d7;
    background: white;
    transform: translateY(-2px);
}

/* TEXTAREA - OGROMNA I PREGLEDNA */
.textarea-wrapper {
    position: relative;
}

.form-textarea {
    width: 100%;
    min-height: 450px;
    padding: 20px;
    font-size: 1rem;
    font-family: 'Courier New', 'Consolas', monospace;
    border: 3px solid #cbd5e0;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    resize: vertical;
    line-height: 1.8;
}

.form-textarea:hover {
    border-color: #0078d7;
    background: white;
}

.form-textarea:focus {
    border-color: #0078d7;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 120, 215, 0.2);
}

.textarea-hint {
    position: absolute;
    bottom: 15px;
    right: 20px;
    background: rgba(0, 120, 215, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.form-help {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #718096;
    font-style: italic;
}

/* ===================================
   BUTTONS - VELIKE I PRISTUPAČNE
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 35px;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    min-height: 60px;
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0078d7 0%, #005a9e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 120, 215, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 120, 215, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn-large {
    width: 100%;
    font-size: 1.3rem;
    padding: 22px 40px;
    min-height: 70px;
}

/* ===================================
   DNS TABLE - JAKA GRANICA
   =================================== */

.table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    border: 4px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dns-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 1rem;
}

.dns-table thead {
    background: linear-gradient(135deg, #0078d7 0%, #005a9e 100%);
}

.dns-table th {
    padding: 18px 20px;
    text-align: left;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 3px solid #333;
}

.dns-table td {
    padding: 15px 20px;
    border: 3px solid #333;
    vertical-align: top;
    background: white;
}

.dns-table tbody tr:nth-child(even) td {
    background-color: #f5f5f5;
}

.dns-table tbody tr:hover td {
    background-color: #e3f2fd;
}

/* Kolone */
.dns-table th:nth-child(1),
.dns-table td:nth-child(1) {
    width: 100px;
    font-weight: 700;
    color: #0078d7;
    font-size: 1.05rem;
}

.dns-table th:nth-child(2),
.dns-table td:nth-child(2) {
    width: 200px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.dns-table th:nth-child(3),
.dns-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Value cell - lomljenje teksta */
.value-cell {
    word-break: break-all;
    word-wrap: break-word;
    white-space: normal;
    max-width: 600px;
    line-height: 1.6;
}

/* ===================================
   ACTIONS SECTION
   =================================== */

.actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.actions .btn {
    flex: 1;
    min-width: 200px;
}

/* ===================================
   INFO BOXES
   =================================== */

.preview-section h2,
.info-box h3,
.example-section h2,
.shortcuts-box h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.info-box,
.example-section,
.shortcuts-box {
    background: #f0f9ff;
    border-left: 6px solid #0078d7;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-box ol,
.shortcuts-box ul {
    padding-left: 25px;
}

.info-box li,
.shortcuts-box li {
    margin: 15px 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.shortcuts-box ul {
    list-style: none;
    padding: 0;
}

.shortcuts-box li {
    padding-left: 0;
}

/* Keyboard key styling */
kbd {
    background: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin: 0 3px;
}

/* Code example */
.code-example {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 25px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.code-example code {
    color: #2ecc71;
}

/* ===================================
   NOTIFICATIONS
   =================================== */

#notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 20px 30px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateX(500px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    max-width: 400px;
}

#notification.show {
    transform: translateX(0);
    opacity: 1;
}

#notification.error {
    background: #ef4444;
}

#notification.success {
    background: #10b981;
}

/* ===================================
   HIGH CONTRAST MODE
   =================================== */

@media (prefers-contrast: high) {
    .form-input,
    .form-textarea {
        border-width: 4px;
    }
    
    .dns-table th,
    .dns-table td {
        border-width: 4px;
    }
    
    .btn {
        border: 4px solid currentColor;
    }
}

/* ===================================
   REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .form-textarea {
        min-height: 350px;
        font-size: 0.9rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions .btn {
        width: 100%;
    }
    
    #notification {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .dns-table {
        font-size: 0.85rem;
    }
    
    .dns-table th,
    .dns-table td {
        padding: 10px;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    body {
        background: white;
    }
    
    .page-container {
        box-shadow: none;
    }
    
    .actions,
    #notification,
    .shortcuts-box {
        display: none;
    }
    
    .dns-table {
        page-break-inside: avoid;
    }
}


