/* 
   HIG (Human Interface Guidelines) Inspired Design System 
   Clean, Premium, iOS-like Aesthetics
*/

:root {
    /* --- Color Palette --- */
    --ios-bg: #F2F2F7; /* System Grouped Background */
    --ios-card-bg: #FFFFFF;
    --ios-primary: #007AFF; /* System Blue */
    --ios-danger: #FF3B30;  /* System Red */
    --ios-success: #34C759; /* System Green */
    --ios-warning: #FF9500; /* System Orange */
    --ios-gray: #8E8E93;    /* System Gray */
    --ios-light-gray: #E5E5EA;
    
    --text-primary: #000000;
    --text-secondary: #8E8E93; /* Label Color */
    
    /* --- Shadows & Effects --- */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --backdrop-blur: blur(20px);
    
    /* --- Radius --- */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--ios-bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--ios-primary);
    transition: opacity 0.2s;
}

a:active {
    opacity: 0.7;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 960px; /* Optimal reading width for iPad/Desktop */
    margin: 0 auto;
    padding: 20px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-title {
    font-size: 34px;
    line-height: 41px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding: 0 10px;
}

.section-title {
    font-size: 20px; /* UIHeader */
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 24px 0 8px 10px;
    font-weight: 400; /* Regular weight for iOS headers */
}

/* --- Components: Card --- */
.ios-card {
    background: var(--ios-card-bg);
    border-radius: var(--radius-lg); /* Slightly larger card radius */
    padding: 24px;
    box-shadow: var(--shadow-sm); /* Subtle shadow for depth */
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
    border: none; /* No border for cleaner look */
}

.ios-card:hover {
    transform: scale(1.01); /* Micro-interaction */
    box-shadow: var(--shadow-md);
}

/* --- Components: List Group (Settings Style) --- */
.ios-list {
    background: var(--ios-card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.ios-list-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ios-light-gray);
    background: var(--ios-card-bg);
    transition: background 0.2s;
}

.ios-list-item:last-child {
    border-bottom: none;
}

.ios-list-item:active {
    background-color: var(--ios-light-gray);
}

.item-content {
    flex: 1;
    margin-right: 12px;
}

.item-title {
    font-size: 17px;
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.item-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
}

/* --- Components: Buttons --- */
.ios-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 40px; /* Pill shape */
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
}

.ios-btn-primary {
    background-color: var(--ios-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.ios-btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 5px rgba(0, 122, 255, 0.2);
}

.ios-btn-danger {
    background-color: rgba(255, 59, 48, 0.1); /* Tinted background */
    color: var(--ios-danger);
}

.ios-btn-danger:active {
    background-color: rgba(255, 59, 48, 0.2);
}

.ios-btn-ghost {
    background: transparent;
    color: var(--ios-primary);
}

/* --- Components: Inputs --- */
.ios-input-group {
    margin-bottom: 16px;
}

.ios-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 4px;
    font-weight: 500;
}

.ios-input, .ios-textarea {
    width: 100%;
    background: var(--ios-bg);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 17px;
    color: var(--text-primary);
    transition: box-shadow 0.2s;
    outline: none;
}

.ios-input:focus, .ios-textarea:focus {
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2); /* Focus ring */
    background: #fff;
}

.ios-textarea {
    resize: vertical;
    min-height: 100px;
}

/* --- Header / Navigation --- */
.ios-header {
    padding: 60px 20px 20px; /* Top padding for breathing room */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--ios-bg); /* Seamless */
}

.ios-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    /* Gradient Text for Premium Feel */
    background: -webkit-linear-gradient(45deg, #007AFF, #5856D6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; 
}
/* Fallback for icon color since text-fill-color affects it if inside */
.ios-logo i {
    -webkit-text-fill-color: #007AFF; /* Or initial */
}

.ios-tagline {
    font-size: 15px;
    color: var(--text-secondary);
}

/* --- Footer --- */
.ios-footer {
    margin-top: auto;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.ios-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--text-secondary);
    margin-top: 10px;
    transition: background 0.2s;
}

.ios-badge:hover {
    background: rgba(0,0,0,0.08);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }
.flex-row { display: flex; flex-direction: row; gap: 10px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }