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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    margin-bottom: 10px;
    font-size: 32px;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab:hover {
    background: #e8e8e8;
}

.tab.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
}

.info-box h3 {
    color: #1976D2;
    margin-bottom: 10px;
    font-size: 18px;
}

.info-box ul {
    margin-left: 20px;
    color: #555;
}

.info-box li {
    margin: 5px 0;
}

.info-box.mt-15 {
    margin-top: 15px;
}

.info-box.mt-25 {
    margin-top: 25px;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    color: #856404;
}

.warning-box.mt-25 {
    margin-top: 25px;
}

.warning-box ul.mt-10 {
    margin-top: 10px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.input-group label .required {
    color: #e74c3c;
}

.input-group label .hint {
    font-weight: normal;
    color: #999;
    font-size: 12px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

button {
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.output-section {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

.output-section.hidden {
    display: none;
}

.output-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 20px;
}

.output-item {
    background: white;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.output-item label {
    display: block;
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 600;
}

.output-item .value {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #333;
    word-break: break-all;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
}

.success {
    background: #d4edda;
    border-color: #28a745;
}

.error {
    background: #f8d7da;
    border-color: #dc3545;
}

.steps-section {
    margin-top: 25px;
}

.step {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.step-number {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    font-weight: bold;
}

.step-content {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 50px);
}

.step-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.step-data {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 13px;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
}

pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    margin-top: 10px;
}

.scheme-logo {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    margin-left: 10px;
}

.visa-logo {
    background: #1434CB;
    color: white;
}

.mastercard-logo {
    background: #EB001B;
    color: white;
}

.cup-logo {
    background: #00447C;
    color: white;
}

.jcb-logo {
    background: #0E4C96;
    color: white;
}

.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 1000;
}

.home-button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Section headings */
h2.section-heading {
    margin: 25px 0 15px 0;
    color: #333;
}

h2.doc-heading {
    color: #333;
    margin-bottom: 20px;
}

h3.section-subheading {
    margin: 25px 0 15px;
    color: #333;
}

h3.calc-steps-heading {
    margin-bottom: 15px;
    color: #333;
}

/* Utility classes */
.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-25 {
    margin-top: 25px;
}

.hidden {
    display: none;
}
