* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.header {
    background: #1e293b;
    border-bottom: 2px solid #fbbf24;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    height: 84px;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1e293b;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.header-title .subtitle {
    font-size: 0.875rem;
    color: #cbd5e1;
    opacity: 0.9;
}

.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 5rem;
    position: relative;
}

.tabs-container {
    position: sticky;
    top: 84px;
    z-index: 999;
    margin-bottom: 1.5rem;
    background: #0f172a;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #334155;
}

.tabs {
    display: flex;
    background: #1e293b;
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    min-height: 44px;
}

.tab-btn.active {
    background: #334155;
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.tab-btn:hover:not(.active) {
    background: rgba(51, 65, 85, 0.3);
    color: #cbd5e1;
}

.tab-btn:active {
    transform: scale(0.98);
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-contents {
    position: relative;
    padding-top: 0.5rem;
}

.tab-content {
    display: none;
    animation: slideIn 0.3s ease-out;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: #1e293b;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card-title {
    color: #fbbf24;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #334155;
}

.card-title i {
    font-size: 1.2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-group label i {
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
    outline: none;
}

.input-group input:focus {
    border-color: #fbbf24;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.input-note {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding-left: 1.5rem;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #1e293b;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: #334155;
    color: #f8fafc;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.quick-examples {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
}

.examples-title {
    color: #f8fafc;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.example-btn {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    outline: none;
}

.example-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
}

.example-btn:active {
    transform: translateY(0);
}

.example-weight {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.example-karat {
    font-size: 0.9rem;
    color: #f8fafc;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.example-note {
    font-size: 0.8rem;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
}

.examples-note {
    color: #94a3b8;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.examples-note i {
    color: #3b82f6;
}

.results-card {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-out;
}

.results-card.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideIn 0.4s ease-out;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    background: #0f172a;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.result-item:hover {
    border-color: #475569;
    transform: translateY(-2px);
}

.result-icon {
    width: 40px;
    height: 40px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
}

.result-label {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.result-value {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.result-danger {
    color: #ef4444 !important;
    font-weight: 900 !important;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.3);
    animation: pulse-danger 1.5s infinite;
}

.result-warning {
    color: #f59e0b !important;
    font-weight: 800 !important;
}

.result-normal {
    color: #22c55e !important;
    font-weight: 700 !important;
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.input-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    animation: shake 0.5s;
}

.validation-alert {
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    opacity: 0;
    transform: translateY(-10px);
    animation: slideIn 0.4s ease-out forwards;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #fecaca;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #fde68a;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.alert-header i {
    font-size: 1.2rem;
}

.alert-messages {
    font-size: 0.85rem;
    line-height: 1.4;
}

.alert-message {
    margin-bottom: 0.25rem;
    padding-left: 1.5rem;
    text-indent: -1.5rem;
}

.accuracy-info,
.closest-karat {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #3b82f6;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s;
}

.accuracy-info:hover,
.closest-karat:hover {
    transform: translateX(4px);
}

.closest-karat {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: #22c55e;
}

.info-icon {
    color: #3b82f6;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.closest-karat .info-icon {
    color: #22c55e;
}

.info-title {
    color: #f8fafc;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.info-text {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
}

.guide-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #334155;
}

.guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.guide-section h3 {
    color: #f8fafc;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-section p {
    color: #94a3b8;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.formula-box {
    background: #0f172a;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.formula-box:hover {
    border-color: #fbbf24;
    transform: translateY(-2px);
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 1rem;
}

.formula-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.step:hover {
    border-color: #fbbf24;
    transform: translateX(4px);
}

.step-number {
    width: 32px;
    height: 32px;
    background: #fbbf24;
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-title {
    color: #f8fafc;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.step-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #334155;
    margin: 1rem 0;
    -webkit-overflow-scrolling: touch;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.reference-table th {
    background: #0f172a;
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #334155;
    position: sticky;
    top: 0;
}

.reference-table td {
    padding: 1rem;
    border-bottom: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.reference-table tr:hover td {
    background: rgba(15, 23, 42, 0.3);
    color: #f8fafc;
}

.reference-table tr:last-child td {
    border-bottom: none;
}

.reference-table tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.2);
}

.reference-table td:first-child {
    color: #fbbf24;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.reference-table td:nth-child(2),
.reference-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    text-align: center;
}

.tips-list {
    list-style: none;
    color: #94a3b8;
    font-size: 0.9rem;
}

.tips-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.3);
    transition: all 0.2s;
}

.tips-list li:hover {
    background: rgba(15, 23, 42, 0.5);
    transform: translateX(4px);
}

.tips-list li i {
    color: #22c55e;
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.about-section {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #334155;
    transition: all 0.2s;
}

.about-section:hover {
    border-bottom-color: #475569;
}

.about-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.about-icon {
    color: #fbbf24;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.about-section:hover .about-icon {
    transform: rotate(10deg) scale(1.1);
    background: rgba(251, 191, 36, 0.2);
}

.about-content h3 {
    color: #f8fafc;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.about-content p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 6px;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.spec-item:hover {
    border-color: #fbbf24;
    transform: translateY(-2px);
}

.spec-label {
    color: #94a3b8;
    font-size: 0.8rem;
}

.spec-value {
    color: #f8fafc;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.support-section * {
    box-sizing: border-box;
}

.social-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.social-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;    
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;   
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;    
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(51, 65, 85, 0.4);
    overflow: hidden !important;
}

.social-link i {
    font-size: 1.2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.social-link span {
    display: none !important;
}

.support-section {
    margin: 1.5rem auto 0;
    padding: 1.2rem;
    text-align: center;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.support-title {
    color: #fbbf24;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.support-title i {
    font-size: 1.1rem;
}

.social-link.facebook {
    color: #1877f2;
    border-color: rgba(24, 119, 242, 0.3);
    background: rgba(24, 119, 242, 0.1);
}

.social-link.facebook:hover {
    background: rgba(24, 119, 242, 0.2);
    border-color: #1877f2;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.2);
}

.social-link.telegram {
    color: #26a5e4;
    border-color: rgba(38, 165, 228, 0.3);
    background: rgba(38, 165, 228, 0.1);
}

.social-link.telegram:hover {
    background: rgba(38, 165, 228, 0.2);
    border-color: #26a5e4;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(38, 165, 228, 0.2);
}

.social-link.donation {
    color: #F50BD8;
    border-color: rgba(245, 11, 216, 0.3);
    background: rgba(245, 11, 216, 0.1);
}

.social-link.donation:hover {
    background: rgba(245, 11, 216, 0.2);
    border-color: #F50BD8;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(245, 11, 216, 0.2);
}

.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid #334155;
    z-index: 10;
}

.social-link:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -30px;
}

@media (max-width: 480px) {
    .social-links {
        gap: 0.8rem !important;
    }
    
    .social-link {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
    }
    
    .social-link i {
        font-size: 1.1rem !important;
    }
}

.app-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    align-items: center;   
    border-top: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.85rem;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.3);
    transition: all 0.2s;
}

.footer-item:hover {
    background: rgba(15, 23, 42, 0.5);
    transform: translateX(4px);
}

.footer-item i {
    color: #fbbf24;
    width: 16px;
    text-align: center;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-bottom: 6rem;
    }
    
    .tabs-container {
        top: 76px;
    }
    
    .header {
        height: 76px;
        padding: 0.75rem;
    }
    
    .logo {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .header-title h1 {
        font-size: 1.1rem;
    }
    
    .header-title .subtitle {
        font-size: 0.8rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
        min-height: 40px;
    }
    
    .tab-btn i {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .input-group input {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        padding: 0.75rem 1rem;
        min-width: 80px;
    }
    
    .social-link i {
        font-size: 1.5rem;
    }
    
    .social-link span {
        font-size: 0.8rem;
    }
    
    .reference-table {
        font-size: 0.8rem;
        min-width: 400px;
    }
    
    .reference-table th,
    .reference-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .tabs-container {
        top: 72px;
    }
    
    .header {
        height: 72px;
        padding: 0.5rem;
    }
    
    .header-content {
        gap: 0.75rem;
    }
    
    .logo {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .header-title h1 {
        font-size: 1rem;
    }
    
    .header-title .subtitle {
        font-size: 0.75rem;
    }
    
    .tabs {
        padding: 0.375rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
        gap: 0.25rem;
    }
    
    .tab-btn span {
        font-size: 0.8rem;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: 100%;
        max-width: 200px;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .tabs-container {
        position: relative;
        top: 0;
    }
    
    .main-content {
        padding-top: 0.5rem;
    }
    
    .header {
        position: relative;
        height: auto;
    }
    
    .card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #334155;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch;
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
    font-size: 0.9rem;
}

.reference-table thead {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    position: sticky;
    top: 0;
    z-index: 10;
}

.reference-table th {
    color: #fbbf24;
    font-weight: 700;
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 2px solid #334155;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.reference-table th:first-child {
    border-top-left-radius: 12px;
    padding-left: 1.5rem;
}

.reference-table th:last-child {
    border-top-right-radius: 12px;
    padding-right: 1.5rem;
}

.reference-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.5;
}

.reference-table tr:last-child td {
    border-bottom: none;
}

.reference-table tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.3);
}

.reference-table tr:hover td {
    background: rgba(251, 191, 36, 0.05);
    color: #f8fafc;
    transform: translateX(2px);
}

.reference-table td:nth-child(1) {
    color: #fbbf24;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    min-width: 70px;
    padding-left: 1.5rem;
}

.reference-table td:nth-child(2) {
    color: #22c55e;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
}

.reference-table td:nth-child(3) {
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-align: center;
    min-width: 120px;
}

.reference-table td:nth-child(4) {
    color: #cbd5e1;
    text-align: left;
    min-width: 150px;
    padding-right: 1.5rem;
}

@media (max-width: 768px) {
    .reference-table {
        min-width: 400px;
        font-size: 0.85rem;
    }
    
    .reference-table th {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .reference-table td {
        padding: 1rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .reference-table td:nth-child(1) {
        padding-left: 1rem;
        font-size: 0.9rem;
        min-width: 60px;
    }
    
    .reference-table td:nth-child(4) {
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .table-container {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 8px;
    }
    
    .reference-table {
        min-width: 350px;
        font-size: 0.8rem;
    }
    
    .reference-table th {
        padding: 0.875rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .reference-table td {
        padding: 0.875rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .reference-table td:nth-child(1) {
        padding-left: 0.75rem;
        font-size: 0.85rem;
        min-width: 50px;
    }
    
    .reference-table td:nth-child(4) {
        padding-right: 0.75rem;
    }
}

.practical-guide {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.practical-title {
    color: #fbbf24;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.practical-subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    padding-left: 2rem;
}

.practical-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.practical-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.practical-step:hover {
    border-color: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0;
    align-self: flex-start;
}

.step-content {
    flex: 1;
    margin-top: 0;
}

.step-title {
    color: #f8fafc;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #475569;
    margin-top: 0;
    line-height: 1.2;
}

.practical-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    grid-column: 1;
    grid-row: 1;
}

.step-content {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
}

.step-title {
    color: #f8fafc;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #475569;
    margin-top: 0;
}

.step-instructions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.instruction {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #e2e8f0;
    font-size: 0.87rem;
    line-height: 1.4;
}

.instruction i {
    color: #22c55e;
    font-size: 0.75rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.instruction.warning i {
    color: #ef4444;
}

.instruction.highlight {
    background: rgba(34, 197, 94, 0.1);
    padding: 0.65rem;
    border-radius: 6px;
    margin-top: 0.25rem;
    border-left: 3px solid #22c55e;
}

.instruction.highlight i {
    color: #22c55e;
    font-size: 0.85rem;
}

.process-flow {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px dashed #475569;
}

.flow-title {
    color: #fbbf24;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.flow-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.flow-step:last-child .flow-number {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.flow-text {
    color: #cbd5e1;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.flow-arrow {
    color: #94a3b8;
    font-size: 1.25rem;
    font-weight: 300;
}

.critical-warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(153, 27, 27, 0.1));
    border-radius: 10px;
    padding: 1.25rem;
    margin: 2rem 0;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    animation: pulse-red 2s infinite;
}

.warning-main-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fecaca;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.warning-main-header i {
    color: #ef4444;
    font-size: 1.1rem;
}

.warning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.warning-card {
    background: rgba(239, 68, 68, 0.05);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.warning-card:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.warning-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
}

.warning-icon.error {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.warning-title {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    flex: 1;
    margin: 0;
}

.warning-desc {
    color: #fecaca;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 768px) {
    .warning-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .warning-card {
        padding: 1rem;
    }
    
    .warning-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .warning-icon.error {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.9rem;
    }
    
    .warning-title {
        font-size: 0.9rem;
    }
    
    .warning-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .warning-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .warning-card {
        padding: 0.875rem;
    }
    
    .warning-icon.error {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .warning-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .warning-card {
        padding: 0.875rem;
    }
    
    .warning-icon.error {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.85rem;
    }
    
    .warning-title {
        margin: 0.4rem 0 0.3rem 0;
    }
}

@media (max-width: 768px) {
    .practical-steps {
        gap: 0.75rem;
    }
    
    .practical-step {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .step-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .instruction {
        font-size: 0.85rem;
    }
    
    .flow-steps {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .flow-arrow {
        display: none;
    }
    
    .flow-step {
        min-width: 70px;
    }
    
    .flow-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .flow-text {
        font-size: 0.8rem;
    }
    
    .warning-grid {
        grid-template-columns: 1fr;
    }
    
    .warning-card {
        padding: 0.875rem;
        gap: 0.65rem;
    }
    
    .warning-icon.error {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .warning-title {
        font-size: 0.85rem;
    }
    
    .warning-desc {
        font-size: 0.8rem;
    }
    
    .critical-warning,
    .warning-box {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .practical-guide {
        padding: 1.25rem;
    }
    
    .practical-step {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-number {
        align-self: flex-start;
    }
    
    .step-title {
        padding-bottom: 0.5rem;
    }
    
    .flow-steps {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .flow-step {
        flex-direction: row;
        gap: 1rem;
        min-width: 100%;
    }
    
    .flow-text {
        text-align: left;
    }
    
    .warning-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .warning-icon.error {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }
}
