/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #e8e8e8;
    min-height: 100vh;
    padding: 30px 20px;
    color: #1a3c6e;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border: 3px solid #000000;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.15);
}

header {
    background: #1a3c6e;
    color: #ffffff;
    padding: 35px 40px 30px;
    text-align: left;
    border-bottom: 4px solid #ffcc00;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 40px;
    width: 80px;
    height: 8px;
    background: #ff3333;
}

header h1 {
    font-size: 2.3em;
    margin-bottom: 8px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

header p {
    font-size: 1em;
    font-weight: 400;
    color: #d4e0f0;
    line-height: 1.5;
}

main {
    padding: 40px 40px 50px;
    background: #fefdfb;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.step h2 {
    color: #000000;
    margin-bottom: 25px;
    font-size: 1.6em;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 3px solid #ffcc00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #000000;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-text {
    margin-bottom: 15px;
    padding: 15px 18px;
    background: #fffef5;
    border: 2px solid #ffcc00;
    border-left: 6px solid #1a3c6e;
    font-size: 0.9em;
    line-height: 1.6;
    color: #000000;
}

.info-text p {
    margin-bottom: 8px;
}

.info-text p:last-child {
    margin-bottom: 0;
}

textarea,
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #000000;
    border-radius: 0;
    font-size: 0.95em;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #000000;
}

/* Remove number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #1a3c6e;
    background: #fffef5;
    box-shadow: 3px 3px 0px rgba(26, 60, 110, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.btn {
    padding: 12px 28px;
    border: 3px solid #000000;
    border-radius: 0;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #1a3c6e;
    color: #ffffff;
    border-color: #000000;
}

.btn-primary:hover {
    background: #000000;
    color: #ffcc00;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: #ff3333;
    color: #ffffff;
    border-color: #000000;
}

.btn-success:hover {
    background: #000000;
    color: #ff3333;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
    margin-bottom: 20px;
}

.btn-secondary:hover {
    background: #ffcc00;
    color: #000000;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    background: #cccccc;
    border-color: #999999;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.domains-list {
    margin: 25px 0;
}

.domain-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 18px;
    margin-bottom: 15px;
    background: #ffffff;
    border: 2px solid #000000;
    border-left: 8px solid #ffcc00;
    border-radius: 0;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
}

.domain-item:hover {
    background: #fffef5;
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.domain-item:nth-child(3n+1) {
    border-left-color: #ffcc00;
}

.domain-item:nth-child(3n+2) {
    border-left-color: #ff3333;
}

.domain-item:nth-child(3n) {
    border-left-color: #1a3c6e;
}

.domain-item .domain-name {
    flex: 1;
    font-weight: 700;
    color: #000000;
    font-size: 1em;
}

.domain-item .price-input-wrapper {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.domain-item .price-prefix {
    color: #000000;
    font-weight: 700;
    font-size: 1.3em;
}

.domain-item .price-input {
    flex: 1;
}

.status-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 0;
    display: none;
    border: 3px solid #000000;
    font-size: 0.95em;
    line-height: 1.5;
    font-weight: 600;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.status-message.show {
    display: block;
}

.status-message.success {
    background: #ccff99;
    color: #003300;
    border-color: #009900;
}

.status-message.error {
    background: #ffcccc;
    color: #660000;
    border-color: #cc0000;
}

.status-message.info {
    background: #ffffcc;
    color: #333300;
    border-color: #ffcc00;
}

.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 3px solid #cccccc;
    border-radius: 0;
    border-top-color: #000000;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

footer {
    background: #e8e8e8;
    padding: 20px;
    text-align: center;
    color: #000000;
    font-size: 0.85em;
    border-top: 3px solid #000000;
    font-weight: 600;
}

footer::before {
    content: '◆ ◆ ◆';
    display: block;
    margin-bottom: 10px;
    color: #1a3c6e;
    font-size: 0.8em;
    letter-spacing: 5px;
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 20px 10px;
    }

    header {
        padding: 30px 25px 25px;
    }

    header::after {
        right: 25px;
        width: 60px;
    }

    header h1 {
        font-size: 1.8em;
    }

    main {
        padding: 30px 25px 40px;
    }

    .domain-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .domain-item .price-input-wrapper {
        flex: 1;
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

/* Blur effect for background when welcome modal is open */
body.modal-open {
    overflow: hidden;
}

body.modal-open .container {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

/* Welcome Modal Styles */
.welcome-modal {
    z-index: 2000;
}

.welcome-modal-content {
    max-width: 500px;
    width: 90%;
    margin: 15% auto;
    text-align: center;
}

.welcome-modal-body {
    padding: 40px 30px;
    background: #ffffff;
}

.welcome-modal-body p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.6;
    color: #000000;
}

.welcome-modal-body p:last-child {
    margin-bottom: 0;
}

.welcome-modal-footer {
    padding: 20px 25px;
    border-top: 3px solid #000000;
    display: flex;
    justify-content: center;
    background: #fefdfb;
}

.welcome-modal-footer .btn {
    margin-top: 0;
    min-width: 120px;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    border: 3px solid #000000;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: #1a3c6e;
    color: #ffffff;
    padding: 20px 25px;
    border-bottom: 3px solid #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-close {
    color: #ffffff;
    font-size: 2em;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #ffcc00;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #000000;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-hint {
    font-size: 0.85em;
    color: #666666;
    margin-bottom: 12px;
    font-style: italic;
    font-family: 'Courier New', Courier, monospace;
}

.modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #000000;
    border-radius: 0;
    font-size: 0.95em;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #000000;
    resize: vertical;
    min-height: 150px;
    max-height: 300px;
    line-height: 1.6;
}

#csvModalStatus {
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #1a3c6e;
    background: #fffef5;
    box-shadow: 3px 3px 0px rgba(26, 60, 110, 0.2);
}

.modal-footer {
    padding: 20px 25px;
    border-top: 3px solid #000000;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fefdfb;
    flex-shrink: 0;
}

.modal-footer .btn {
    margin-top: 0;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}