:root {
    --primary: #0f9862;
    --primary-dark: #0a7a4e;
    --primary-light: #12b875;
    --primary-subtle: #e8f5f0;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
* {
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}
.header {
    text-align: center;
    margin-bottom: 32px;
}
h1 {
    color: var(--gray-900);
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
}
h1 span {
    color: var(--primary);
}
.subtitle {
    color: var(--gray-500);
    font-size: 1.125rem;
    margin: 0;
}
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
}
.panel {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s ease;
}
.panel:hover {
    box-shadow: var(--shadow-lg);
}
.panel h2 {
    margin: 0 0 4px 0;
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.panel h2 .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-subtle);
    border-radius: 10px;
    font-size: 1.125rem;
}
.panel-description {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0 0 20px 0;
    padding-left: 46px;
}
.image-wrapper {
    position: relative;
    display: inline-block;
}
.image-container {
    position: relative;
    display: inline-block;
    cursor: crosshair;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}
.crosshair {
    position: absolute;
    pointer-events: none;
}
.crosshair-h, .crosshair-v {
    position: absolute;
    background: var(--primary);
    opacity: 0.9;
}
.crosshair-h {
    width: 24px;
    height: 2px;
    transform: translateX(-50%);
    border-radius: 1px;
}
.crosshair-v {
    width: 2px;
    height: 24px;
    transform: translateY(-50%);
    border-radius: 1px;
}
.form-group {
    margin-bottom: 16px;
}
label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}
input[type="number"], input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
    color: var(--gray-800);
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="number"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 152, 98, 0.15);
}
button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    margin-top: 8px;
}
button:hover {
    background: var(--primary-dark);
}
button:active {
    transform: scale(0.98);
}
button:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
}
.result {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    border: 1px solid var(--gray-200);
}
.result-label {
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.result-value {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 4px;
}
.status {
    text-align: center;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.status.loading {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.status.ready {
    background: var(--primary-subtle);
    color: var(--primary-dark);
    border: 1px solid #a7f3d0;
}
.status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.coord-display {
    position: absolute;
    background: var(--gray-900);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
}
.coord-display strong {
    color: var(--primary-light);
}
.info {
    background: var(--white);
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9375rem;
    line-height: 1.7;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.info strong {
    color: var(--primary);
}
.info code {
    background: var(--primary-subtle);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.875rem;
}
.info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.info a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
.row {
    display: flex;
    gap: 12px;
}
.row > * {
    flex: 1;
}
.converter-section {
    padding: 0;
}
.converter-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.converter-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}
.converter-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 24px 0;
}
.wcs-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}
.wcs-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wcs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.wcs-table th,
.wcs-table td {
    padding: 8px 12px;
    text-align: left;
}
.wcs-table th {
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wcs-table th:first-child {
    border-radius: 6px 0 0 6px;
}
.wcs-table th:last-child {
    border-radius: 0 6px 6px 0;
}
.wcs-table td {
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}
.wcs-table td:nth-child(odd) {
    font-weight: 500;
    color: var(--gray-500);
}
.wcs-table td:nth-child(even) {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--primary);
    font-weight: 600;
}
.wcs-table tr:last-child td {
    border-bottom: none;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.status.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #92400e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
